WordPress is renowned for its convenience. In most cases, its installation is a straight-forward process that lasts less than five minutes. Furthermore, most hosting platforms offer applications to install WordPress automatically. If you would rather install WordPress on your own, however, here is a comprehensive guide.
Before you start
There are a few things required before you start the installation process. They will help guarantee its success. First, you should verify that your hosting platform provides the necessary software and system resources. You will also need access to a web server.
- PHP 7.3 or higher
- MySQL 5.6 or Maria DB 10.1 or higher
There’s a more detailed list of requirements for web hosts on the official WordPress requirements page. Several web hosting companies in Uganda offer these services. Examples include Hostalite, Sadjawebsolutions, and Java Net systems.
Requirements for your computer
- Login details (User ID and Password) to access the server via FTP
- A text editor
- FTP software
- An internet browser
You need to know how to use a text editor to modify the main configuration file. If you use windows, then notepad will work. If you are on macOS, then you could use TextEdit. Later on, you may also want to change your template files. A good text editor will help you do that too.
The FTP software will help you upload files and set permissions. There are several FTP programs to choose from. Examples include FileZilla. After you’ve got all these requirements in place, you may proceed to the installation.
This is a quick summary of the guidelines for those already familiar with the software. A more descriptive explanation will follow.
- Download and extract the WordPress package, in case you haven’t yet done so.
- Create a database for your WordPress installation. You may use MySQL or MariaDB. It should also have a user with administrator privileges for access and modification.
- (Optional) identify and rename wp-config-sample.php to wp-config.php, then edit the file with your text editor to add your database access details. NOTE: if you prefer not to rename the WordPress files, then this step can be ignored. The installation helper will create a wp-config.php file for you.
- Upload the WordPress files to your preferred folder on the webserver: if you want to access WordPress from the root of your domain (i.e. http://yoursite.com) then move or upload all the components of the extracted WordPress directory into the root of your webserver, (usually public_html). If you’d rather have the WordPress installation in a separate directory on your domain (for instancehttp://yoursite.com/blog/) then create the directory (blog, in this case) on your server, and upload the WordPress files there via FTP.
NOTE: If your FTP software can change file names to lowercase, disable it.
- Run the WordPress installation helper by accessing the directory that contains the WordPress files through your browser. Of you installed WordPress in the root directory, then you should visit http://yoursite.com/. If you uploaded the WordPress files to a subdirectory like “blog,” for instance, then you should visit http://yoursite.com/blog. WordPress should be installed after you’ve done that.
Step 1: Download WordPress
Download and extract the WordPress package from www.wordpress.org/download. To unzip the package, you may use software applications like WinRAR or 7zip. If you have shell access to the webserver and are comfortable using command-line tools, then you can download WordPress directly to the webserver using “wget.”
Step 2: Create a database
If you are using a hosting account, you may already have a WordPress database configured for you, or there may be an automated solution to do so. Consult your hosting company’s support forums or your control panel for clues. If you find that you’ll have to create one manually, follow the guidelines for using phpMYAdmin below to establish a WordPress username and database.
Please note that for tools like cPanel, Plesk, and to use the MySQL Client, you’ll need specialized instructions.
Furthermore, if you have a single database in use, you may install WordPress in it, but you’ll need to create a unique prefix for your tables to avoid overwriting existing database entries.
How to use phpMyAdmin
Most web servers come with PhpMyAdmin pre-installed, so you may follow the following guidelines to create a WordPress database and user name. If you are working on your computer, most Linux versions allow you to install PhpMyAdmin automatically.
These steps are written for version 4.4 of PHPMyAdmin. The user interface may change slightly across different versions.
If a WordPress database doesn’t already exist in the dropdown on the left-hand menu, then build one.
- Choose a name for your WordPress database (‘WordPress’ or ‘blog’ should suffice). However, most hosting providers (especially for shared hosting) will require a name that starts with your username and an underscore, so, even if you’re working on your computer, it would be wise to check your hosting platform requirements so you can follow them on your server and be able to transfer the database without modification. Enter your preferred database name in the Create database field and choose the most appropriate collation for encoding and language. Most times, it is best to choose from the “utf8” series. If you can’t find your language, choose utf8mb4_general_ci.
- Click the phpMyAdmin icon in the upper left to go back to the main page, then click the “users” tab. If there aren’t any WordPress users, then make one.
- Click “add user.” Choose a WordPress username (‘WordPress’ would work) and type it into the user name field. (Check to make sure “use text field” is selected from the dropdown menu). Create a secure password, preferably containing a combination of lower and upper case letters, symbols, and numbers, and type it into the password field. (Check to see that “Use text field: is selected from the dropdown). Confirm the password in the Re-type field.
- Record your chosen username and password.
- Leave all the settings for global privileges as they are.
- Click go
- Go back to the “users” screen and click the “edit privileges” icon for the WordPress user you just created.
- In the database-specific privileges section, choose the database you have just created for WordPress under the “add privileges to the following database” dropdown and click go.
- The page will reload and show the privileges for that database. Select “check all” and click “Go”
- On the page that appears, take note of the hostname specified after “Server” at the top of the page. (This is typical “localhost”).
Step 3: configuring wp-config-php
You can both build and modify the config file yourself, or you could skip this step and leave WordPress to attempt to do this on its own when you run the installation script. Either way, WordPress will still need your database credentials.
Return to the location where the WordPress package was extracted in the beginning, rename the file “wp-sample.php” to wp-config.php and open it with a text editor. Enter your database details under the section labelled //**MySQL settings – you can get this info from your web host.
- DB_NAME: the name of the database you created for your WordPress installation in step 2.
- DB_USE: the username for your WordPress website (also created in step 2)
- DB_PASSWORD: The password you created beneath the username (step 2). DB_HOST: the hostname you chose in step 2 (typically “localhost,” but not always). If a port, socket or pipe is required, add a colon, then append the required information to the hostname.
- DB_CHARSET: The database character set, usually shouldn’t be changed.
- DB_COLLATE: The database collation should usually remain empty
Specify your secret keys under the section designated: “*Authentication Unique Keys and Salts.”
Save the wp-config.php file.
Step 4: Upload the files
Now you have chosen where on your domain the WordPress site should appear: it could be in the root directory (i.e. http://yoursite.com) or a subdomain.
NOTE: The location of your root web directory in the webserver’s file system will change across hosting providers. Check with support or your system admin if you do not know where it is.
To upload to the root directory: Use an FTP application to transfer all the contents of the WordPress directory on your computer into the root directory of your website.
To upload to a subdirectory: Before the upload, rename the WordPress directory to your preferred name, then use an FTP client to transfer the entire folder to your website’s root directory.
Step 5: Run the installation script
Visit the WordPress directory in your web browser to start the installation.
If you placed the WordPress files in the root directory, you should visit http://yoursite.com/admin/install.php. On the other hand, if you put WordPress in a subdirectory called blog, for instance, then you should point the browser to http://yoursite.com/blog/install.
Php configuration file setup
If WordPress doesn’t find a wp-config.php file, it will notify you and offer to build and modify the file on its own. It will also ask for database details so you should have them on hand. If everything works, then you can continue the installation process. However, if it doesn’t, you’ll have to create, edit, and upload the wp-config file on your own (step 3).
Completing the installation
If all goes well, you should see a screen with the WordPress logo asking for site details such as the title, preferred username, password, and email address. There will also be a checkbox for whether you want your website to appear on search engines like Bing or Google. Leave that free if you want your blog to be accessible to everyone browsing the internet.
If you’ve successfully installed WordPress, then a login screen will appear.
Common installation problems
You see a directory listing instead of a web page:
The web server needs to be configured to show “index.php” by default. The simplest way around this is to create a file named .htaccess in the installation directory and place a directive there. An alternative is to add a redirect command to the webserver’s configuration files.
If you see several “headers already sent” errors:
You likely made a syntax error while editing the wp-config.php. To fix this:
- Download wp-config.php to your computer.
- Open it with a text editor.
- Verify that the first line comprises nothing but <?php, and that there aren’t any characters before it. This includes white space.
- Make sure that the last line contains nothing but ?>, and that there aren’t any characters or white spaces after it.
- If your text editor saves files in Unicode format, ensure it doesn’t add a byte order mark (BOM). Most Unicode-capable text editors do not specify whether a BOM has been added to files; if this is the case, then try using a different text editor.
- Save the file, upload it to your webserver, then reload the page in your browser.
WordPress is one of the easiest website builders to install and modify. Compared to others like Joomla and Drupal, it boasts a simplified, mostly-automated installation process. That said, it can also be challenging for beginners. If you are facing challenges that aren’t covered in this guide, then you may consult the WordPress community forums for help with your issue. You could also consider professional help. If you want to hire a web developer in Uganda, there are several web design agencies you could consult.