A lot of people wonder whether they could install WordPress on their computers? The simple answer is yes. A WordPress installation on your computer is referred to as a local server or localhost. But most beginners are not advised to do that. The reason why some chaps install WordPress on a local server environment is to build themes, plugins, or to test things out. Installing WordPress locally on your computer facilitates a testing environment that doesn’t affect your live website or blog.
- Why Should You Install WordPress on Localhost?
- How to Install WordPress on Localhost?
- What is WAMP?
- Step 1. Download a Local Server Software
- Step 2. Install WAMP Server
- Step 3. Run WAMP and Set Up a Database
- Step 4. Preparing WordPress Files Using WAMP
- Step 5. Installing WordPress on Localhost
- Step 6. Troubleshooting WAMP Issues
Why Should You Install WordPress on Localhost?
Normally WordPress developers use locally installed WordPress to develop & test their plugins and themes. However, Beginners can also install WordPress on localhost to learn WordPress. They can also test new WordPress theme and plugins, and experiment without affecting the live website.
Learning WordPress is fun. Its ease of functioning and user-friendly environment is quite tempting. Millions of people around the globe rely on WordPress for their websites. That constitutes more than 37% of the total websites live at this moment. Amazing, isn’t it? Installing WordPress on your localhost, will give you a glimpse of WordPress. Keeping that in mind, I will tell you how to install WordPress on localhost.
Note: If you install WordPress locally on your computer, then only you would be able to see your website. If you want to run a blog for others to see, then you do not need to install WordPress on your computer. To make your WordPress site available to the internet, you need to have a domain name and web hosting. Then install WordPress on it.
I recommend you to follow this guide if you want to start a blog: How to Start a Blog in 2020 in just 10 Steps (Ultimate Step By Step Guide for Beginners)
Having that said, if you are really interested in installing WordPress locally on your computer to learn more about it, then I highly recommend you to do so. So, let’s see the correct way to install WordPress on localhost.
How to Install WordPress on Localhost?
Installing WordPress on localhost is quite easy. You just have to replicate these easy steps with me. First of all, you can not install WordPress on your computer directly. You are required to create a working environment for WordPress to work on your computer. Mainly, it is about just 3 major tasks, which are:
- Create an environment
- Download WordPress
- Install WordPress on localhost
These 3 major tasks can be accomplished via some easy steps. Just follow my lead and you will have a working copy of WordPress on your computer successfully.
Before you proceed with the steps, you need to know a bit about the software which are are going to use. It is called WAMP.
What is WAMP?
WAMP is a compilation of Apache web server, PHP and MySQL bundled together for Windows computers. Apache, PHP, and MySQL are separate open source softwares. However, installing them separately is definitely a difficult task. Since WordPress is written in PHP language it requires a platform to run on. This is where WAMP comes into the picture. Softwares like WAMP allow you to have a local working environment within minutes.
Now, let’s move ahead with the procedure to install WordPress on localhost.
Step 1. Download a Local Server Software
We need a local server software(In our case, WAMP) to create a localhost environment and install WordPress on localhost. WAMP is the way to do this. You can use the development environment of your choice like MAMP or XAMPP according to your OS (whether it is Windows, MacOS, or Linux).
Just go to the WampServer website and click on the ‘Start Using WampServer’ button.
Or you can use this link for Direct download: WampServer from Source Forge
It will take you to the downloads section. There are 2 versions of WAMP available: WampServer x32 bit and WampServer x64 bit. Select the WampServer version that matches with version type of your Windows.
To find out whether you are using 32 or 64-bit operating system, go to Control Panel » System and Security » System in your computer. Or just select the Compter icon on desktop and click on properties, it will list all the details.
Step 2. Install WAMP Server
Once your WAMP download is complete, you can click on the wamp server execution file to start the installation. Carefully follow all the instructions on the installation screen.
During the installation process, you need to select a web browser. By default, it will be Internet Explorer. You can change it to any web browser of your choice. Just locate the .exe file of the web browser in the Program Files of your computer. Then click on the “Continue” button on some subsequent popups until the “Install” option comes.
Step 3. Run WAMP and Set Up a Database
The next thing you are supposed to do is create a blank MySQL database. On launching WAMP, you’ll see a green WampServer icon at the bottom right corner of your desktop screen along with other icons. Simply click on it and then click on phpMyAdmin(It is a web-based application to manage MySQL databases).
Note: If the WampServer icon is Red or Yellow, then it means the services (Apache, MySQL, PHP) are not active. To activate the server services, click on the icon, and then click on the “Start all the Services” option.
Then click on the phpMyAdmin option. It will open the browser and take you to the phpMyAdmin login screen. Simply enter the username: root and leave the password field blank. These are the default login for your localhost phpMyAdmin.
Then click on the ‘Go’ button to continue. After logging in, you need to create a new database for WordPress. For doing that, click on Databases in phpMyAdmin, then choose a suitable name for your database, and after that click on the ‘Create’ button.
Once your database is ready, you can install WordPress on localhost.
Step 4. Preparing WordPress Files Using WAMP
If you have a downloaded copy of WordPress ready, then well & good. If you don’t then just go to WordPress.org website and download the latest version of WordPress. It will be downloaded as a zip file.
You need to decompress the zip file and copy the ‘WordPress’ folder. Then you need to navigate to the folder where you installed WAMP.
The directory of WAMP installation may defer from person to person. So, just navigate as per your installation. Go to the WAMP installation folder, then find the folder names “www”. Paste your “WordPress” folder into this “www” folder.
You can rename your “WordPress” folder to anything that you want but be sure to choose something that you’ll remember. For the sake of convenience, common names include newsite, mysite, testsite, etc. This will be used in the URL of your local WordPress site.
In this tutorial, I renamed the folder from WordPress to testsite. So, I am able to access my site at http://localhost/testsite/
Open your browser, type your localhost address in the address bar
Similarly, you can access your website by going to localhost/yourwordpressname in the web browser.
Step 5. Installing WordPress on Localhost
When you visit your site for the first time on the localhost, it’ll ask you to select a language and then show you the database setup information. Once you have read it carefully, go ahead and click on the ‘Let’s go’ button to continue.
Thereafter, you need to enter your database details such as database name, username, password, host, and table prefix.
The database name will be the one that you entered in Step 4. In my case, I called it “bloggingguide”. Enter the username as “root” (without quotes), and leave the password field blank. You don’t have to fill in the database host and table, just leave them as it is.
Thereafter, click on the ‘Submit’ button. WordPress will generate a configuration file for you in the backend.
Sometimes, it may show an error stating that there’s an error in establishing a database connection. Don’t worry, you just need to go back and check your details, you must have put something wrong.
Afterward, you will see a success message on your screen. It will display something like “WordPress is connected to your database”. Go ahead and click on the ‘Run the installation’ button to continue.
It will take you to the WordPress welcome screen. You will be required to add a title for your new WordPress website, choose an admin username and password, and provide an admin email address.
Once you’re done with all this, click on the ‘Install WordPress’ button.
When the installation get’s completed, you’ll see a success message. That’s it, you are done.
Congratulations, on successfully installing WordPress on the localhost using WAMP. You can now log in to your locally hosted WordPress site.
If you have followed all the aforementioned steps, you stand no chance of facing any error along the way of WordPress installation on localhost. Still, you can face a common known issue due to port conflict. Let’s address it in the next section.
Step 6. Troubleshooting WAMP Issues
As you may have already noticed, WAMP is pretty easy to use by everyone. However, if you running into problems, then the following troubleshooting tips may help.
1. Fix the WAMP – Skype Conflict
If you have Skype on your computer, then WampServer may not be able to work properly due to a conflict with Skype. This is a well-known issue. The conflict is caused by Skype and Apache, both using the same port 80. There is a simple fix for this problem.
Open Skype, navigate to Tools » Options. This will bring up a dialog box, from here you need to click on Advanced » Connections.
Then uncheck the box that says “Use port 80 and 443 as alternatives for incoming connections”. Save the settings and restart Skype. That’s it, you are done.
2. Install Visual C++ Redistributable
WAMP needs Visual C++ Redistributable for Visual Studio 2012 to run. If you don’t have it installed on your computer, then you can download and install it from the Microsoft website.
Having a working copy of WordPress on localhost is great for learning and testing purposes. But remember, if you want to start a WordPress blog that others can see, then you need to get a domain and hosting and install WordPress on it.
I hope this article helped you learn how to install WordPress on Windows using WAMP. Let me know in the comments if you come across any problem during installation, I’d try my best to help you out.
If you found this tutorial useful, then you can thank me by sharing this article with your buddies.