Installing WordPress on your computer can be a great step
towards building a testing environment for your WordPress themes and plugins.
WordPress can be installed both on Mac and Windows and upon successful
installation, it runs just like the live site. The beauty of installing
WordPress on your localhost is that you can carry out a variety of tests
without worrying that things will go wrong. I will be illustrating how to
install WordPress on one of the most common desktop servers – Xampp. For you to
follow this tutorial you need to download and install Xampp.
Why Create a Local WordPress Site?
Creating local WordPress sites is a common practice among
developers and site owners. It allows you to test WordPress without creating an
actual website on the internet.
Local websites are only visible to you on your computer. You
can try different WordPress themes and plugins, test their features, and learn
the WordPress basics.
If you already have a WordPress website, then you can create
a local copy of your website on your computer to try out new plugin updates
before implementing them on your live website.
Important: Local website will only be visible to you on your
computer. If you want to make a live website, then you’ll need a domain name
and WordPress hosting.
Follow the step by step instructions in our how to start a
WordPress blog guide when you are ready to create a live website.
Having said that, let’s check out how to install WordPress
locally on Windows, Mac, or Linux using XAMPP.
What is XAMPP?
XAMPP is a software package that includes all things you
need to set up a local server environment on your computer.
In order to create a local WordPress site, you need to set
up a web server software (Apache), PHP, and MySQL on your computer.
PHP is a programming language and MySQL is a database
management software. Both of them are required to run WordPress.
Installing each of them separately is quite difficult for
beginners. This is where XAMPP comes in.
XAMPP makes it easy for you to build WordPress websites locally.
It is available for Windows, Mac, and Linux based computers.
Let’s get started by installing XAMPP and setting it up to
run your local WordPress site.
Installing WordPress on Localhost Xampp
Before we get started with WordPress installation, you need
to have Xampp running on your computer. You can download Xampp from here,
installation of Xampp is easy since should click on the .exe file and allow it
to run.
You should follow the installation prompts like the installation procedure of any other software or.exe files. It is also important to note that Xampp utilizes the same port 80 and 443 as Skype and at times there is a conflict between the two.
You can solve this conflict by editing the Skype ports or editing Xampp settings to use different ports instead of ports 80 and 443. When you create the new ports for Xampp your localhost address will have to change to include the ports.
For example: if you have the new port as 80, your localhost
address will be;
http://localhost:80 or http://127.0.0.1:80
If you want to run the Xampp server without editing the ports on Skype or Xampp you can run one at a time. This means you can switch off Skype to run the Apache server. Detailed Installation of Xampp is beyond the scope of this tutorial.
Step 1: Download and install XAMPP on your computer
The first step on your way to install WordPress locally is
to download and install the XAMPP software. You can download the Windows
installer file from Apache Friends. It’s a big file, about 110 MB, so it might
take a minute or so depending on your connection:
Once the download finishes, run the file you downloaded to
launch the XAMPP installer. If you’re running antivirus software, you might get
a warning like this:
Just click Yes to continue. Depending on your Windows
configuration, you might also get a prompt about User Account Control (UAC).
Just continue through that prompt as well. Once you get through all of the
prompts, you should see the standard installer screen:
Just click Next to continue.
On the next screen, you can choose which components to install. To install XAMPP and WordPress, you do not need all of the components. In addition to the required components, all you need are:
- MySQL
- PHPMyAdmin
Again, this is all that’s needed to install WordPress locally. Uncheck everything else and click Next.
You can now select which folder to install XAMPP in. I
always leave it as the default:
On the next screen, you’ll get a prompt asking you to
install Bitnami for XAMPP. You do not need this to install XAMPP
and WordPress, so just uncheck the box:
Once you click Next, you’re ready to run the install:
The install process might take a few minutes:
Once it finishes, you can launch the control panel to start
working with XAMPP:
Step 2: Start the modules and test your server
To install XAMPP and WordPress properly, you’ll need to run two modules:
- Apache
- MySQL
You can start both modules from the XAMPP control panel:
Once you launch them, you should see their status turn to green:
And now you should be able to test that your local server is
working by going to http://localhost/ in your web browser of
choice:
If all went well, you now have a functioning XAMPP server on your Windows PC! But now it’s time to install XAMPP and WordPress. So here’s how to get a WordPress site up and running on XAMPP.
Step 3: Add the WordPress files
If you’ve ever manually installed WordPress, the rest of the
process should feel pretty familiar. First, you need to go to wordpress.org
and download the latest version of WordPress.
Then, in Windows, navigate to the folder where you installed
XAMPP. For me, that’s C://xampp. It should be something similar for you. Then,
in that folder, find the htdocs subfolder:
In htdocs, create a new folder for your test site.
This folder name will become the sub-name used to access your site. For
example, if you make the folder testsite, you’ll access your site by going to
http://localhost/testsite.
And enter a name for your database and click Create. Your name can be anything – just remember it because you’ll need it for the next step:
The only step where this process will differ from a normal
install is the database details. When you get to the database details, enter
them like this:
- Database Name = Name of the database you created in PHPMyAdmin
- Username = “root”
- Password = leave blank
Then finish the rest of the WordPress install process like
normal.
Once you complete the process, you should see your brand new
WordPress install running perfectly on your local host:
As you can see above we have successfully installed
WordPress and login and everything works well. If we navigate to our htdocs
folder then to the site’s folder – demo we can open and see the wp-config.php
file.
Conclusion
We have successfully,
installed WordPress on the localhost Xampp server
In the next tutorial, I will be installing WordPress on Wamp
Server another popular desktop server. I hope this tutorial has guided you and
enlightened you on how to install WordPress on localhost. If you have any
questions, comments, compliments, or further inquiries please get in touch
using the comments section below.
0 Comments