How to Install a WordPress Test Site on Your Computer.
One of the best ways to test a new website you’re developing is to install a test WordPress site on your computer. Test it locally, make sure everything looks and works fine, then immediately upload it to a live site.
When it comes to WordPress, there are a few things to consider when running locally. You will need a working WordPress installation, an accessible SQL database, and a local web server on which everything will run.
You can easily configure all three on your local computer using the process outlined below.
Install a local webserver
The first thing you’ll need to run your local WordPress test site is a web server running on your local machine. To run the webserver, you need to make sure the correct ports are working, the PHP and Perl programming language libraries are installed, and the web server software can properly serve pages in your browser.
Similar to setting up an FTP server or a local Minecraft server, there are Windows applications to run a local webserver. One of the most popular of these is XAMPP
XAMPP is an open-source Apache web server that can be installed on Windows 10, Linux, or macOS. It includes everything you need in one package.
To get started, simply download and install the XAMPP software on your desktop or laptop.
1. Run the installer, make sure all components are enabled and click Next to continue.
2. Choose a location for your web server. The best option is to select a default folder at the root of the C: drive, where the permissions will be set correctly. Click Next to continue.
3. Select your languages ​​and click Next. Do not disable Bitnami, it will help you install WordPress after installation. Select “Next”. Finally, select Next again to install XAMPP.
The installation will take about five minutes. Once completed, the XAMPP Control Panel will open. Close it now.
Install WordPress on the XAMPP webserver
Launch Control Panel again as administrator by clicking Start, typing XAMPP, right-clicking on the XAMPP application, and choosing Run as Administrator. You may need to confirm when Windows asks if you want the application to run as an administrator.
Once launched, select Start to the right of Apache and MySQL to launch the web server and SQL database required for the WordPress test site to function properly.
You can see the file structure of the webserver by looking at the location where you installed XAMPP. In this example, XAMPP is installed to C: \ XAMPP. All of your web files will be placed here, which can be viewed in your browser.
XAMPP comes with Bitnami, which allows you to quickly install WordPress on top of your current XAMPP web server.
1. Open a web browser and enter localhost in the URL field. Press Enter. When the XAMPP control panel opens, scroll down to the bottom where you will see the Bitnami section.
2. Select the WordPress icon at the bottom of the page. On the Bitnami site, scroll down to the WordPress section and select the Windows link to download WordPress.
3. After the download is complete, double-click the file to run the installation package. If necessary, select Next to go through the Bitnami WordPress module. Make sure the folder specified for installation matches the XAMPP installation folder.
4. In the next step, set up the admin username, name, email and password that you want to use on your test WordPress site.
5. When finished, click Next, enter a name for your test WordPress site and click Next. On the next page, you can set up email support so your test site can send notifications to your email. It’s not obligatory.
6. You can uncheck “Run WordPress in the cloud with Bitnami” as this will just be a local test WordPress site on your computer. Click “Next†to continue. Click Next again to begin the installation. Once the installation is complete, click Finish to launch the Bitnami WordPress module.
This will launch your default web browser with your new local WordPress test site loaded. The link will include your localhost IP (your computer’s IP) with / WordPress / at the end where your site is stored.
The path to these WordPress files is: C: \ XAMPP \ apps \ WordPress \ htdocs \
You are now ready to set up your test WordPress site and start using it.
Use your WordPress test site
To access your local WordPress admin page, enter HTTP: // localhost / WordPress / wp-admin in the browser URL field and log into WordPress using the credentials you provided when installing WordPress above.
There are several things you can do with this new local WordPress test site.
Import a copy of your live site
Import a copy from your Live site
You can export your real website and upload it to this setup for testing.
To do this, you need to back up your WordPress site and WordPress database. This will provide you with a zipped folder with all WordPress files as well as a * .gz file which is a backup of your MySQL database
You can copy your WordPress file backups directly to your local WordPress folders. You can also import the MySQL database file * .gz to your local MySQL database using phpMyAdmin.
1. Open phpMyAdmin by visiting WordPress plugin / in your browser.
2. Select the “Import” tab and click the “Select File” button in the “File to Import” section.
3. Navigate to the * .gz database file with your backup and phpMyAdmin will import all WordPress posts and settings to your test WordPress site.
When you finish and reopen your local WordPress installation using the same link above, you will see that your original online site is now running on your local machine.
What else you can do with your WordPress test site
Other things you can do with a WordPress test site
In addition to running your live site on your local machine, there are many other useful things you can do with your local WordPress test site.
-
- Install and test any WordPress theme.
- Test your WordPress site code changes.
- Install and test your WordPress plugin configurations.
- Play around with the WordPress configurations to see how they change your site.
You can do all of this on your local WordPress test site because every change you make only happens on your computer, not on the internet.