• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Create a VM ($25 Credit)
  • Buy a Domain
  • 1 Month free Back Blaze Backup
  • Other Deals
    • Domain Email
    • Nixstats Server Monitoring
    • ewww.io Auto WordPress Image Resizing and Acceleration
  • About
  • Links

IoT, Code, Security, Server Stuff etc

Views are my own and not my employer's.

Personal Development Blog...

Coding for fun since 1996, Learn by doing and sharing.

Buy a domain name, then create your own server (get $25 free credit)

View all of my posts.

  • Cloud
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • How to buy a new domain and SSL cert from NameCheap, a Server from Digital Ocean and configure it.
    • Setting up a Vultr VM and configuring it
    • All Cloud Articles
  • Dev
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • How to setup pooled MySQL connections in Node JS that don’t disconnect
    • NodeJS code to handle App logins via API (using MySQL connection pools (1000 connections) and query parameters)
    • Infographic: So you have an idea for an app
    • All Development Articles
  • MySQL
    • Using the free Adminer GUI for MySQL on your website
    • All MySQL Articles
  • Perf
    • PHP 7 code to send object oriented sanitised input data via bound parameters to a MYSQL database
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • Measuring VM performance (CPU, Disk, Latency, Concurrent Users etc) on Ubuntu and comparing Vultr, Digital Ocean and UpCloud – Part 1 of 4
    • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
    • Setting up a website to use Cloudflare on a VM hosted on Vultr and Namecheap
    • All Performance Articles
  • Sec
    • Using the Qualys FreeScan Scanner to test your website for online vulnerabilities
    • Using OWASP ZAP GUI to scan your Applications for security issues
    • Setting up the Debian Kali Linux distro to perform penetration testing of your systems
    • Enabling TLS 1.3 SSL on a NGINX Website (Ubuntu 16.04 server) that is using Cloudflare
    • PHP implementation to check a password exposure level with Troy Hunt’s pwnedpasswords API
    • Setting strong SSL cryptographic protocols and ciphers on Ubuntu and NGINX
    • Securing Google G Suite email by setting up SPF, DKIM and DMARC with Cloudflare
    • All Security Articles
  • Server
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • All Server Articles
  • Ubuntu
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • Useful Linux Terminal Commands
    • All Ubuntu Articles
  • VM
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • All VM Articles
  • WordPress
    • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
    • Installing and managing WordPress with WP-CLI from the command line on Ubuntu
    • How to backup WordPress on a host that has CPanel
    • Moving WordPress to a new self managed server away from CPanel
    • Moving a CPanel domain with email to a self managed VPS and Gmail
    • All WordPress Articles
  • All

Installing WordPress

This page was linked from Building a WordPress website from scratch

If you don’t have a WordPress friendly online website or a local web developer environment setup you may want to go back a step.

Advertisement:



Downloading WordPress

  1. Goto https://wordpress.org/download/ and click download.
  2. Extract the files (if on Windows, Mac OS X does this automatically).

Where do you want your blog to live
WordPress can be installed..

  • at the top of a website (e.g http://www.seanwes.com)
  • into a sub folder http://www.yourdomain.com/blog
  • into a sub domain http://simon.fearby.com
  • or a sub folder on a sub domain (e.g http://simon.fearby.com/blog/ )
  • or on your your local pc into an Apache (XAMPP installation).
  • You can install multiple WordPress instances on the save domain or sub domain (they just need to be in different folders and connect to different databases)

If you are installing WordPress online make sure you have a  working domain or sub domain, can access the files (via FTP) and have a reliable internet connection.

If you just created a website or sub domain you may need to wait a day or so for the replication of the name across the host servers or internet.

Creating a Database and Database Users online on a CPanel host

This section will guide you through creating database, username etc on a CPanel host (online server)

  • Login to your online CPanel host (e.g http://www.yourdomiain.com/cpanel )
  • Click MySQL DatabasesMySQL Database
  • Under the Create a New Database heading next to New Database:  Enter a database name (e.g  “wordpressdatabase” ) – Obfuscate the name bit to put off hackers if you wish.
  •  – Note:Before you click Create Database check to see if you have text in front of the database name text field (e.g “server_”), if you do the will be prefixed to your database name.
  • Click Create Database, Write down the database name that as created and click go back.
  • On the same page under the MySQL Users – Add a new user heading type the name of the database username (e.g “blogusr“)  – Obfuscate the name bit to put off hackers if you wish.
  •  – Note:Before you click Create a User check to see if you have text in front of the username text field (e.g “server_”), if you do the will be prefixed to your database username.
  • Use the Generate Password button to generate an 18 character password (click advanced options and change the length to 18). Sample database username password “cvS+J}#.+CTXD^%{!q“
  •  – Note: Write down the Password (you will never see this again).
  • Not we can assign the user to the database and grant permissions. On the same page under the MySQL Users – Add a User to a Database heading select the user and database that you just created and click Add.
  • User the Manage User Privileges screen tick the ALL PRIVILEGES checkbox and press Make Changes.
  • Congratulations you have now created a MySQL database, user and assigned the user to the database.
  • Your database is now ready to use and write all of the details down (you will need them

Creating a Database and Database Users locally with XAMPP

  • Make sure your XAMPP Apache and MySQL services are running in the XAMPP Control Panel
  • Open http://localhost/phpmyadmin 
  • Click the Databases tab
  • In the database name textbox enter your database name (e.g “w3bsit3_database“). Try and scramble the database to prevent hackers who will try and guess it.
  • Change the Collation to “utf8-general-ci“
  • Click Create
  • Click the Home icon just under the phpMyAdmin graphic at the top of the left hand frame.
  • Click the Users tab in the right hand frame.
  • Click Add user
  • In the username textbook enter a username (e.g “bl0gdbu5er“) – Scramble the username too.
  • Change the host to “localhost“
  • Set and confirm a password (make it as long as possible and use and many characters and special symbols as you can). Goto https://grc.com/password if you want a secure password.  A good example of a strong password is “tb:<`q4M_c*>T\{}a{j3!{\bRTS-Yf>wbF/Cx+q9`}C\cy}hY?JyJESaTZXsvi%”.
  • Click Check All user the global privileges section.
  • Click Go
  • Congratulations you have now created a MySQL database, user and assigned the user to the database.
  • Your database is now ready to use and write all of the details down (you will need them).

Updating WordPress Config

  • Go to the folder where your WordPress was saved to and rename the file “wp-config-sample.php” to “wp-config.php”.
  • Open the file “wp-config.php”, these are the values we need to update
    WP Config
    WP Config.
  • Paste in your database name into the DB_NAME name field. e.g “define(‘DB_NAME’, ‘server_wordpressdatabase‘);
  • Paste in your database username into the DB_USER name field. e.g “define(‘DB_USER’, ‘server_blogusr‘);
  • Paste in your database password into the DB_PASSWORD name field. e.g “define(‘DB_PASSWORD’, ‘cvS+J}#.+CTXD^%{!q’);
  • Now the most important part, we need to obtain some encryption keys from https://api.wordpress.org/secret-key/1.1/salt/.
  • Goto https://api.wordpress.org/secret-key/1.1/salt/ and copy and paste the page contents to the clipboard.
    WP Salt
    WP Salt
  • Now go back to the “wp-config.php” page and scroll down to where you can see “define(‘AUTH_KEY’,         ‘put your unique phrase here’);“
  • Delete the 8 lines with “..put your unique phrase here..” in them and paste over the contents from https://api.wordpress.org/secret-key/1.1/salt/
  • Your config file should look something like this.
    WP Salt Added to config
    WP Salt Added to config
  • You are now ready to upload or copy WordPress.  Write down your databasename, username, password and WordPress salts.

Copy or Upload WordPress to your web servers htdocs folder

  • Not is the time to decide if you want WordPress to live at the top of the site or in a  sub folder.  Create any folders that you need to now.
  • If you re just installing WordPress on your local PC copy the WordPress fils to your XAMPP htdocs folder (and or into the desired sub folder).
  • If you are uploading the files to a CPanel host online.  I recommend you use the https://filezilla-project.org FTP software to upload files to your CPanel server. TIP: Set your Maximum simultaneous transfers/uploads/downloads to 1 and set a download limit of 100kb and upload limit of 50kb if your site locks your out for uploading too fast (Most hosts do this to prevent hackers hitting the server too hard).
  • WordPress is made up of many small files so please be patient uploading to a CPanel.

Installing WordPress
If you have created the database and user and edited the config properly you re not ready to install and configure WordPress.

  • If you are running WordPress locally open your web browser and navigate to http://localhost or of you re using CPanel navigate tho your domain where you up-loaded WordPress to (e.g http://www.yourdomain.com ).
  • If all is ok you will see a WordPress setup wizard asking you to set the default language.
    Wordpress Default Language
    WordPress Default Language
  • Enter your Blog Title (you can change this later).
  • Enter a Super User/Admin username (this username will be used as a back door back int he site so don’t make it your name and don’t pick a normal admin name like “admin”, “su” etc as hackers may guess it). Add a few random chars at the end of the username to stop hackers.
  • Choose a very strong password, I’d strongly suggest you use a password form https://www.grc.com/passwords.htm (changing some characters if you wish).
  • Write the username and password down as you won’t be able to get this again.
  • Login to the site with the new username and password.
    WP First Login
    WP First Login
  • Now lets take a backup of the site just incase we stuff up anytime after this.

User Accounts

WordPress is a popular platform, and hackers like popular platforms because they know where the login pages are if there are any exploits available in those platforms.

We can mitigate the damage from hackers by using strong salts (configured during setup, disabling/renaming the admin account, installing security plugins or renaming the login page but the most effective way to protect your site is to update plugins frequently, use a strong and unique passwords (don’t use the same password on different sites).

Personally you should be checking to see if any of your accounts have been compromised with sites like https://haveibeenpwned.com and consider using password managers like http://www.1password.com to generate and manager unique passwords for your sites.

If you do create extra logins for others to access your site don’t give away too much access and consider installing plugins to tighten what access people get.

First Backup

Before you do anything on your site our need to make a backup (critical step before applying a theme with sample data). It is a good idea to make frequent backups of all of your data (not just your WordPress site). WordPress is quite robust but things may go wrong, you may get hacked, the host may go bankrupt or have an unrecoverable server crash, you may screw something up or want to roll back your site to an earlier version.

Here are the three golden rules of backup:

  1. Backup to three different places.
  2. At least two of the backup locations need to be on different media.
  3. One of the locations needs to be offsite.

Offsite Backup

Choose a few of the following offset backup options.

  • Apple Time Machine
  • Manual File Copy (copy files to a removable drive frequently).
  • http://www.crashplan.com/ – Automatic local machine backup for windows and Mac.
  • http://www.backblaze.com/ – Automatic local machine backup for windows and Mac.
  • Gmail – zip up the files and email them offsite.
  • Dropbox
  • OneDrive etc

How to backup your local XAMPP WordPress

Database Backup

You can easily backup your database my logging into your http://localhost/PHPMyAdmin/ utility.

  1. Open your http://localhost/PHPMyAdmin/ program.
  2. Select your database (expand the treeview node).
  3. Click Operations
  4. In the Copy Database section enter a database copy name (e.g “blogdb_feb152015“) and click Go. This will create a hot backup on your server.
  5. Now click the Export tab.
  6. Select Custom – display all options.
  7. Scroll to the bottom (most options are advanced options, best to leave them alone unless you need them).
  8. Click Go, this will export all of your MySQL database tables and records and save it to a text file that can recreate your whole database. Save the file in a backup folder with today’s date and short description.
  9. Note: This has not backed up your media files just the data (post titles, body (minus media files), themes and plugins. 
  10. Next: Backing up the files.

File Backup

Don’t backup the files unless you have backed up the database first (see above). Backing up the physical files of your wordpress site is easy.

  1. Browse to the htdocs folder of your XAMPP installation and zip it up. 
  2. Add the date, time and short description to the end of the filename and store it next to the backup of  your database files.
  3. Zip up the database and files and copy them offsite.

How to backup your local CPanel instance of WordPress

Database Backup

Backing up your CPanel instance of WordPresa is much like backing up a local XAMPP instance but first you need to login to your CPanel and click phpMyAdmin. 

  1. Login to your http://www.yourdomain.com/CPanel/ 
  2. Select your database (expand the treeview node).
  3. Click Operations
  4. In the Copy Database section enter a database copy name (e.g “blogdb_feb152015“) and click Go. This will create a hot backup on your server.
  5. Now click the Export tab.
  6. Select Custom – display all options.
  7. Scroll to the bottom (most options are advanced options, best to leave them alone unless you need them).
  8. Click b, this will export all of your MySQL database tables and records and save it to a text file that can recreate your whole database. Save the file in a local backup folder with today’s date and short description.
  9. Note: This has not backed up your media files just the data (post titles, body (minus media files), themes and plugins. 
  10. Next: Backing up the files.

File Backup

Don’t backup the files unless you have backed up the database first (see above). Backing up the physical files of your wordpress site is easy.

  1. Login to you online hosts FTP site with an FTP program.
  2. Browse to the htdocs folder of your XAMPP installation and copy it to a local folder on your local PC (this will take a while to download).
  3. Add the date, time and short description to the end of the filename and store it next to the backup of your database files.
  4. Zip up the database and files and copy them offsite.

Go back to Building a WordPress website from scratch

Donate and make this blog better





Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]

Primary Sidebar

Poll

What would you like to see more posts about?
Results

Support this Blog

Create your own server today (support me by using these links

Create your own server on UpCloud here ($25 free credit).

Create your own server on Vultr here.

Create your own server on Digital Ocean here ($10 free credit).

Remember you can install the Runcloud server management dashboard here if you need DevOps help.

Advertisement:

Tags

2FA (9) Advice (17) Analytics (9) App (9) Apple (10) AWS (9) Backup (21) Business (8) CDN (8) Cloud (49) Cloudflare (8) Code (8) Development (26) Digital Ocean (13) DNS (11) Domain (27) Firewall (12) Git (7) Hosting (18) IoT (9) LetsEncrypt (7) Linux (21) Marketing (11) MySQL (24) NGINX (11) NodeJS (11) OS (10) Performance (6) PHP (13) Scalability (12) Scalable (14) Security (45) SEO (7) Server (26) Software (7) SSH (7) ssl (17) Tech Advice (9) Ubuntu (39) Uncategorized (23) UpCloud (12) VM (45) Vultr (24) Website (14) Wordpress (25)

Disclaimer

Terms And Conditions Of Use All content provided on this "www.fearby.com" blog is for informational purposes only. Views are his own and not his employers. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. Never make changes to a live site without backing it up first.

Advertisement:

Footer

Popular

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Setup two factor authenticator protection at login on Ubuntu or Debian
  • Using the Yubico YubiKey NEO hardware-based two-factor authentication device to improve authentication and logins to OSX and software
  • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
  • Add Google AdWords to your WordPress blog

Security

  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Setup two factor authenticator protection at login on Ubuntu or Debian
  • Using the Yubico YubiKey NEO hardware-based two-factor authentication device to improve authentication and logins to OSX and software
  • Setting up DNSSEC on a Namecheap domain hosted on UpCloud using CloudFlare
  • Set up Feature-Policy, Referrer-Policy and Content Security Policy headers in Nginx
  • Securing Google G Suite email by setting up SPF, DKIM and DMARC with Cloudflare
  • Enabling TLS 1.3 SSL on a NGINX Website (Ubuntu 16.04 server) that is using Cloudflare
  • Using the Qualys FreeScan Scanner to test your website for online vulnerabilities
  • Beyond SSL with Content Security Policy, Public Key Pinning etc
  • Upgraded to Wordfence Premium to get real-time login defence, malware scanner and two-factor authentication for WordPress logins
  • Run an Ubuntu VM system audit with Lynis
  • Securing Ubuntu in the cloud
  • No matter what server-provider you are using I strongly recommend you have a hot spare ready on a different provider

Code

  • How to code PHP on your localhost and deploy to the cloud via SFTP with PHPStorm by Jet Brains
  • Useful Java FX Code I use in a project using IntelliJ IDEA and jdk1.8.0_161.jdk
  • No matter what server-provider you are using I strongly recommend you have a hot spare ready on a different provider
  • How to setup PHP FPM on demand child workers in PHP 7.x to increase website traffic
  • Installing Android Studio 3 and creating your first Kotlin Android App
  • PHP 7 code to send object oriented sanitised input data via bound parameters to a MYSQL database
  • How to use Sublime Text editor locally to edit code files on a remote server via SSH
  • Creating your first Java FX app and using the Gluon Scene Builder in the IntelliJ IDEA IDE
  • Deploying nodejs apps in the background and monitoring them with PM2 from keymetrics.io

Tech

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • US v Huawei: The battle for 5G
  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Is OSX Mojave on a 2014 MacBook Pro slower or faster than High Sierra
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..
  • The case of the overheating Mac Book Pro and Occam’s Razor
  • Useful Linux Terminal Commands
  • Useful OSX Terminal Commands
  • Useful Linux Terminal Commands
  • What is the difference between 2D, 3D, 360 Video, AR, AR2D, AR3D, MR, VR and HR?
  • Application scalability on a budget (my journey)
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Why I will never buy a new Apple Laptop until they fix the hardware cooling issues.

Wordpress

  • Replacing Google Analytics with Piwik/Matomo for a locally hosted privacy focused open source analytics solution
  • Setting web push notifications in WordPress with OneSignal
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..
  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Upgraded to Wordfence Premium to get real-time login defence, malware scanner and two-factor authentication for WordPress logins
  • Wordfence Security Plugin for WordPress
  • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
  • Installing and managing WordPress with WP-CLI from the command line on Ubuntu
  • Moving WordPress to a new self managed server away from CPanel
  • Moving WordPress to a new self managed server away from CPanel

General

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • US v Huawei: The battle for 5G
  • Using the WinSCP Client on Windows to transfer files to and from a Linux server over SFTP
  • Connecting to a server via SSH with Putty
  • Setting web push notifications in WordPress with OneSignal
  • Infographic: So you have an idea for an app
  • Restoring lost files on a Windows FAT, FAT32, NTFS or Linux EXT, Linux XFS volume with iRecover from diydatarecovery.nl
  • Building faster web apps with google tools and exceed user expectations
  • Why I will never buy a new Apple Laptop until they fix the hardware cooling issues.
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..

Copyright © 2023 · News Pro on Genesis Framework · WordPress · Log in

Some ads on this site use cookies. You can opt-out if of local analytics tracking by scrolling to the bottom of the front page or any article and clicking "You are not opted out. Click here to opt out.". Accept Reject Read More
GDPR, Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT