When it comes to WordPress, there are several things to consider when running locally. You’ll need a working WordPress installation, an available SQL database, and a local web server for everything to run on. You can set up all three on your local computer without too much effort, using the process outlined below.
Install a Local Web Server
Install a Local Web Server
The first thing you’ll need to run a local WordPress test site is a web server running on your local computer. Running a web server involves ensuring the right ports are running, PHP and Perl programming languages libraries are installed, and that the web server software can properly serve pages to your browser. Similar to setting up an FTP server or a local Minecraft server, there are Windows applications available to run a local web server as well. One of the most popular of those is XAMPP. XAMPP is an open-source Apache web server you can install on Windows 10, Linux, or macOS. It includes everything you need all in one package. To get started, just download and install the XAMPP software to your desktop or laptop PC.
Install WordPress on Your XAMPP Web Server
Install WordPress on Your XAMPP Web Server
Launch the control panel again as admin by selecting Start, typing XAMPP, right-clicking the XAMPP application and choosing Run as administrator. You may need to confirm when Windows asks if you want the application to run with admin rights. Once it launches, select Start to the right of Apache and MySQL to launch the web server and the SQL database needed for your WordPress test site to work properly. You can see the web server’s file structure by looking at the location where you’ve installed XAMPP. In this example, XAMPP is installed in C:\XAMPP. This is where all of your web files will go that’ll be viewable from your web browser. XAMPP comes with Bitnami, which lets you quickly install WordPress on top of your current XAMPP web server.
Using Your WordPress Test Site
Using Your WordPress Test Site
To access your local WordPress admin page, type http://localhost/wordpress/wp-admin into the browser URL field and log into WordPress using the credentials you set up during the WordPress installation above. There are a few things you can do with this new local WordPress test site.
Import a Copy of Your Live Site
You could export your actual online website and load it into this installation for testing. To do this, you’ll need to backup your WordPress site and WordPress database. This will provide you with a zipped folder with all of the WordPress files, as well as a *.gz file which is the backup of your mySQL database. You can copy the backed up WordPress files directly into your local WordPress folders. You can also import your mySQL *.gz database file into your local mySQL database using phpMyAdmin.
Other Things You Can Do With a WordPress Test Site
In addition to running your live site on your local machine, there are a lot of other useful things you can do with your local WordPress test site.
Install and test any WordPress themeTest making code changes to your WordPress siteInstall and test WordPress plugin configurationsPlay around with WordPress configurations to see how it changes your site
You can do all of these things in the safety of your local WordPress test site because every change you make only happens on your computer, rather than the web.