- This topic has 0 replies, 1 voice, and was last updated 1 year, 11 months ago by Oghenemarho.
- February 11, 2020 at 1:36 pm #85630Spectator@oghenemarho
In our last post we talked about why WordPress is the preferred content management platform and looked into how to set up your local development environment in readiness for a WordPress installation. Today we will go through the steps needed to install WordPress and run it for the first time on your local PC.
If you recall, your local development environment is set up in a way that mimics a live web hosting server, so all the work you do installing and configuring it will have similar results as if it were a live website. The only difference is that this website that you build will not be publicly accessible on the internet. People can’t just type a web address and access it yet.
So without wasting any more time, let’s dive in:
Step 1: Create a Virtual Host
On our localhost server, we need to create a virtual host folder for our project, which will house the files for our installation. This is required to prevent any configuration errors that may arise as a result of moving from your local development environment to a live server because of the difference in folder structures between the platforms.
To start, create a folder in the Wamp installation subdirectory. This is where your Wamp files were installed (usually C:\wamp64). In this location there should be a folder named www. Open it, create a new folder there and give it a name (preferably the name of the website you want to build).
Make sure you have WampServer running then, go to your web browser and type in the URL for your localhost which should be http://127.0.0.1/. This will load up the WampServer homepage. At the bottom of the page click on the link that says Add a Virtual Host and on the new page that loads, fill in the required information. The name of the virtual host is the name of the site you want to build, and the complete absolute path is the filepath to the folder you just created (i.e. C:\wamp64\www\*sitename*). You can ignore the optional fields and click on Start the creation of the VirtualHost to finish up the process.
After the creation process is complete, right-click on the WampServer icon in your taskbar and select Tools > Restart DNS to ensure the newly created virtual host is recognized by your localhost server. By the time you reload your browser to the http://127.0.0.1/ page, you should see the newly created virtual host listed at the bottom of the page, listed under Your VirtualHost.
Step 2: Create a Database
Next up we need to create a database that our WordPress installation can connect to. WordPress makes use of relational databased such as MySQL or MariaDB to store records and data entries related to its content management system. The database needs to be created before the WordPress installation so that during the install process, the tables, columns and records can be inserted into the database for the CMS to function properly. PhpMyAdmin will be used to as an administration tool to create the database on your local server.
On the WampServer homepage (http://127.0.0.1/) click on the phpMyAdmin link at the bottom of the page. You will be presented with a login page. The default username is root and you can leave the password field blank before clicking on the Go button.
On the phpMyAdmin homepage, below the logo on the left you will see a database icon labelled New. Click on it to begin the process of creating a new database.
Enter a name for the database you want to create and be sure to make it one that is easily recognizable as related to your website. In the drop-down menu beside the entry field for your database name, you can select the collation for your language and encoding. For most WordPress installations, it is better to choose from the “utf8_” collation series since it has the best support for the CMS. It’s usually recommended to choose “utf8mb4_general_ci” as the default, or else you want to use an encoding specific to your language.
Once you’re done, click the Create button and after the process concludes, you will see your newly created database listed on the right of the phpMyAdmin homepage. We now need to create a user account that has the necessary privileges to interact with your newly created databases. From the top menu of the phpMyAdmin homepage, click on User Accounts. Scroll down and click on Add new user and then provide the required info in the provided fields. Most importantly you need the username and password, and change the Host name drop down list from Any host to Local. Scroll to the bottom of the page and click Go.
This will create the user account and on the page that loads, you can assign unique privileges to this user for your database. Click on the Database button at the top, then select your newly created database from those listed and click Go. A page listing the privileges specific to your database will come up. Select Check All and Go to complete the process.
Step 3: Download and install WordPress
The WordPress installation files can be downloaded from https://wordpress.org/download/. The most recent version is WordPress 3.5.2 and it requires servers running PHP version 7.3, MySQL version 5.6 or MariaDB version 10.1. All of these requirements are met by our WampServer instance, but you can check the WampServer homepage to verify.
The downloaded installation files will be zipped and you will need to extract the content first by right-clicking on it and selecting the Extract All option and following the steps. After extraction, copy the contents of the wordpress directory to the folder you created earlier for the virtual host (i.e. the C:\wamp64\www\*sitename* folder). Now you’re ready to begin the install process.
Go to the WampServer homepage in your web browser and click on the name of your virtual host that you created earlier. This will launch the WordPress installer from the files you copied to the virtual host folder and you will be greeted with a screen asking you to pick your language. Do so and continue.
The next screen will inform you of the database information needed for the installation to continue. These include the database name, username, password and host. Click Let’s Go to load the page where you will enter the information that you provided when you were creating your database for this WordPress installation. You can leave the table prefix with its default value and click the Submit button to validate the information.
If everything is as it should be then the installer will inform you that WordPress can communicate with your database and you can click the button labelled Run the installation. On the next page that appears, more information is requested about the title of your site, your account username, password and email address. Fill in the necessary information and click Install WordPress.
The installation process will take seconds and once you’re done, you will be presented with a login screen for you to enter your username and password which you created in the previous step.
If you got to this stage without any issues or error messages then congratulations, you have successfully installed WordPress and taken the next major step in building your website. You can log in to view the WordPress dashboard which hosts all the basic tools you need to start the design process or you can simply type the name of the folder you created in your web address bar to see what the default template looks like for this new site you created.
The process of installing WordPress is relatively straightforward on any platform which is part of the allure of it as a content management system and though there are online site builders that provide similar functionality without having to install anything or move any files from local to online servers, WordPress still offers the best balance between easy of use and depth of features which is why it is the CMS of choice whether for building a simple personal website or a massive news and multimedia website with over a decade of content.
In our next part of this series we will take a look at the WordPress Dashboard and how to change the style and layout of our new website.
- You must be logged in to reply to this topic.