Installing WordPress locally basically means building your website on your computer using a web development platform, before finally revealing it to the world by web hosting. In this case, we are using WAMP and XAMPP, and you will need Windows on your computer.
It may sound like a complicated process at first, but once you install it the first time using this easy step by step procedure, every new WordPress installation for your new test sites will get easier.
- What are WAMP and XAMPP?
- Why Do You Need To Install WordPress Locally?
- How to install WordPress locally using WAMP
- How to install WordPress locally using XAMPP
Let’s get started.
What are WAMP and XAMPP?
WAMP is a set of applications designed for the Windows operating system. It functions as a web development platform consisting of
- Apache webserver
- PHP programming language
- OpenSSL for SSL support
- MySQL database
Although you can install these software programs separately, WAMP provides a software rack. By downloading the WAMP server, you can have everything you need to develop a web application, all in one package, the only other thing you will need is a Windows PC.
Created by the Apache friends, XAMPP is also a web development platform that also provides a software stack consisting of
- Apache webserver
- PHP and Perl programming language
This cross-platform open-source software provides a local server that you can install on any desktop or laptop as long as it has Windows running.
WAMP and XAMPP act as virtual servers on your computer. You can test your website privately and assess the performance of different WordPress features, plugins, and add-ons before integrating them into your website. A well-designed website is crucial at drawing organic traffic and improving conversion rates.
Why Do You Need To Install WordPress Locally?
If the idea of using WordPress locally feels like a waste of time, let’s look at a few situations where it would be beneficial:
Point out navigation and compatibility issues quickly
It helps you test the navigability of your website before moving it to the main server. By installing WordPress on your computer first, you can point out compatibility issues within your plugins, WordPress core, and themes.
Test new features
You can test new WordPress features before adopting them into your live website. This enables you to assess if they are effective in resolving the problem at hand or making the situation worse.
Sharpen your WordPress skills
As a beginner, working with WordPress locally enables you to gain some hands-on experience before working on your main website. We can call it sharpening your skills on a dummy before getting to the real thing.
Develop themes and plugins and check to see if they’re ready for the market
If you are a WordPress developer, you can use the locally hosted WordPress to develop and test plugins and themes before releasing them to the market.
Do things privately before making them live
With a locally hosted website, web developers can keep their projects private before releasing them to clients. You can release completed projects to the client in milestones to avoid being duped.
Save on hosting while you’re still working on your site
You can save on hosting fees. A web host comes at a cost, and incurring this cost is unnecessary if your site is still work in progress.
How to install WordPress locally using WAMP
Step 1: Install WAMP on Windows PC
Here are six steps you can use to install WordPress locally with WAMP in Windows.
First things first, download WAMP to Windows by visiting their official website, http://www.wampserver.com/en/. Click on ‘start using WAMP server. You will receive two download options:
- A 32bits
- A 64 bits WAMP server
Download a version that matches your 32 or 64-bit operating system.
If you have an older version of WAMP, you will need to uninstall it first from Windows. Downloading a new version over an older one will interfere with operations. WAMP is also not compatible with Windows XP, SP3, or Windows Server 2003.
Once it is fully downloaded, begin the installation process. You will receive a screen with the license agreement. Read and move on to select a location destination for WAMP in Windows. Leave the destination folder as it is or choose a different destination of your choice in Windows.
Next, you will need to select the components that will be installed. Leave it as it is and move to the next set up process, which is a start menu folder. Let it remain as it is or select a different folder in Windows.
Click next, and you will find a window prompting you to begin the installation process.
Begin the installation process and click finish. The Wamp server is now in Windows on our computer.
Step 2: Set Up Database
Once you launch WAMP on Windows, it will create a green icon on the bottom of your screen. Clicking on the icon will provide quick access to the WAMP server.
Select phpMyAdmin. You will use it to manage your database. You will be directed to the phpMyAdmin login page on your web server. For the username, use the name ‘rooter’. Leave the password blank and click go.
Now that you are logged in click on databases. There is a field where you can name and create a new database. Name your database test and click create.
Step 3: Download and Add WordPress Files in the WAMP Directory
Go to the folder where you stored the WAMP program. Create a subfolder under WAMP and name it ‘Test’. Then go to your WordPress zip file and extract data to your newly created subfolder.
Step 4: Install WordPress on Windows via WAMP
You will see several links. For the database name, use the name you used to create one. For the username, label it as root, and the password will remain blank as it is. Leave everything else untouched. And select submit.
You will receive a message of confirmation on your screen, indicating that WordPress has been successfully connected to our database.
Click on ‘run the installation’. It will redirect you to your WordPress page. Fill in the personal details as needed.
Step 5: Enable Pretty Permalink
Permalinks are URLs to individual blog posts, pages, and categories in your WordPress site. They do not change.
“Pretty permalinks” means a URL with the domain name and a readable string of identifiers for the individual post, for instance, http://www.sample.com/2020/06/02/a-new-post. They are called pretty because they are readable to humans, unlike ugly permalinks that contain incomprehensible numbers.
With the latest version of WordPress, you can change the pretty permalink setting to avoid seeing errors on your test pages.
To do this,
- Go to your WordPress site as an admin.
- Go to settings and select permalinks to activate it.
- There are a variety of permalink structures you can choose from or customize your own in the provided custom structure field.
Step 6: Troubleshoot WAMP Errors
WAMP is quite easy to use and friendly to beginners. In case it gives you some problems when working, you can troubleshoot and resolve the issue easily.
Having your Skype running at the same time as your WAMP server is likely to develop into a full-blown Skype-WAMP conflict.
The problem arises when Apache and Skype share the same port.
To resolve it,
- Go to the Tools menu in Windows and select Options.
- A dialogue box will appear.
- Click on advanced, and in the options that appear select connections.
- Find the part that reads ‘Use port 80 and 443 as alternatives for incoming connections.’ Uncheck the box beside it.
How to install WordPress locally using XAMPP
Here are six easy-to-follow steps to install WordPress on Windows using XAMPP.
Step1: Installing XAMPP on Windows PC
To start, go to Apache Friends and download XAMPP for Windows. Ensure that you have adequate space to store the file, which is around 149 Mb.
Run the downloaded file to launch the XAMPP installer.
A window will appear prompting you to select components. You do not need all the components when installing XAMPP and WordPress locally. Deselect all except MySQL and PHPMyAdmin. Apache and PHP are already selected by default.
Click next. You will be presented with the XAMPP installation folder window. You can change the folder in which you want to store your XAMPP file or leave it as it is. In this case, we will leave it as it is.
Click next. The next window will prompt you to install Bitnami for XAMPP. We do not need this when installing WordPress locally using XAMPP. Uncheck the box and click next.
You will get a screen indicating that you have completed the setup process. You are now ready to begin installing XAMPP. Hit next, to begin the process.
You should see the progress of the XAMPP installation on the next screen as below. The installation process may take some time depending on the speed of your PC.
Once the installation is complete, you can start the XAMPP in the control panel.
Step 2: Start XAMPP and Check the Server Status
In the XAMPP control panel, start the Apache and MySQL modules. They will change color to green, indicating that you have launched the two modules.
Type http://localhost/ on your browser. It should redirect you to the XAMPP page, indicating the XAMPP server on your computer is properly installed, and the setup was a success.
Step 3: Download and Add WordPress Files in the XAMPP Directory
You need to get the latest version of WordPress. You can download for free from https://wordpress.org.
Find the Windows folder where you installed XAMPP. Open the folder and find ‘htdocs’, which is a subfolder.
Create another subfolder under ‘htdocs’ which you can name ‘sample’. Extract the WordPress .zip file you downloaded to the ‘sample’ folder.
Step 4: Create a Database
On phpMyAdmin, click databases. Create a database and give it a name. In this case, we will name it “Sample”, and click the Create button. You now have a database.
Step 5: Use On-screen Installer to Install WordPress Locally
When you visit your sample website, which in our case is http://localhost/sample/, you should be able to see the WordPress installer as below
Click on WordPress, and you will get this page. You are now in a position to install WordPress easily.
Remember the name of the database you created on phpMyAdmin. Click ‘let’s go’. Type the name of your database in the space provided. For the user name, type root. Leave the password blank for now and leave the rest of the fields unchanged.
Continue with the setup process.
You now have a properly installed XAMPP and a WordPress that is well set up.
Step 6: Troubleshoot XAMPP Errors
Properly installing your WordPress locally using XAMPP does not guarantee a smooth experience. You are bound to face some hitches, but it is nothing unsolvable. You may experience these problems when new with the using XAMPP, but with hands-on experience and after adjusting the platform to your computer set-up and usage, working with it should be smooth.
We will walk through some of the most common XAMPP errors, how you can troubleshoot these problems, and resolve them.
a) Exceeding Maximum PHP Execution Time
This problem is likely to occur when trying to add large-capacity files to your site, such as large plugins. You will need to change the PHP settings that limit how long an execution time should be.
You can make adjustments by going to your XAMPP control panel. In the Apache row, click config and select php.ini. It should open the file we will need to make adjustments.
- Go to the XAMPP folder
- Select the PHP directory, then open php.ini. It should open a text editor.
- Find the line with ‘max_execution_time’ and edit the time to something larger like 120.
- Save the file and close it.
- Then go to the XAMPP control panel. Stop Apache and restart it to pick up on the new settings.
b) Exceeded Maximum File Size
You are likely to experience this error when trying to upload large files, such as images. In this case, you will still need to make edits on the php.ini file.
This time, our target text is a sentence reading upload_max_filesize. Change the digits on this text to something that can accommodate your workload. The new number you add must be a multiple of two. It is measured in megabytes, which is denoted with a letter M.
Find post_max_size on the same text and add a similar number. Any changes made to upload_max_filesize must be made to post_max_size. In case one value is increased, and the other remains unchanged, the program will use the smaller value of the two as the maximum size of the file that can be uploaded.
c) Conflict in the utilization of the Apache ports
With this error, you will receive the message that ports 443 and 80, which are used by Apache, are in use by another program.
Find the program in Windows that is using these ports and stop it. For a longer-lasting solution, use Windows Firewall. Go to Windows Control Panel, find Windows Firewall, click advance settings, and add an inbound rule that ports 80 and 443 should always remain unblocked.
d) Inability to add menu items.
While it’s questionable why you would need so many items for your menu, we will go ahead and help you resolve an error where the menu items are maxed out.
Go to the XAMPP folder, select the PHP directory, open php.ini text and find max_input_vars. To increase the limit from the default value of 1,000, you need first to determine the number of menu items you need. Multiply this number by 11 and add 9 to the result.
- Make your changes
- Save and close the file
- Restart Apache
You can install WordPress on Windows using WAMP and XAMPP using an easy process. Ensure that you download the latest version of the program. With WAMP, you can get a 32-bit version or a 64-bit version. It depends on your computer system. The same goes for WordPress, download the latest.
Once you learn to install WAMP, XAMPP, and WordPress in Windows correctly, you can use as many testing sites as possible. Although things will be smoother when using the WAMP server, you may experience a few errors with XAMPP. However, a few changes in the settings should have the program up and running again.
You must keep in mind that installing WordPress locally in Windows only has you viewing it. Any posts you make will be blocked from the world. To make your site public, you have got to invest in a domain name. You also need to find a reliable web hosting.
Read Other WordPress Guides:
- How to Speed Up WordPress Site
- Ultimate WordPress Security Guide
- How to Create the Best WordPress Staging Site
- How to Make WordPress Site Live
- How to Add Custom Fonts to WordPress
- How to Add Security Questions to Your WordPress Login Screen
- How to Stop Users From Sharing Passwords in WordPress