Locally Host a WordPress Site | XAMPP & Plugin Method

Table of Contents
š ļø Restore Your WordPress Site Locally with XAMPP + All-in-One WP Migration
With XAMPP and the All-in-One WP Migration plugin, you can easily restore a full backup of your WordPress site ā perfect for running a private local copy for testing, development, or data recovery purposes š§Ŗš§°.
I recently used this method to recover content from old blog posts that I had permanently deleted. Fortunately, they still existed in archived backups I had saved. This approach turned out to be the fastest and easiest way to get my site up and running locally.
š« Note: This guide is not for creating a public-facing website. Itās strictly for private use ā ideal for testing or retrieving data from previous backups without exposing the site to the internet.
š Information Gathering Before You Begin
While you might not need this step when using XAMPP with the All-in-One WP Migration plugin, it’s a smart move to gather a few key details just in case. š”
Sometimes, things donāt run exactly the same locally as they do on your live site ā you may encounter minor compatibility issues or unexpected behavior. Having this information on hand can help you troubleshoot quickly and keep your restoration process smooth. āļøš
Before setting up XAMPP for local WordPress development, itās essential to gather key information from your live WordPress site. This ensures that your local setup matches your live environment, making the migration and restoration process smoother. Hereās what you need to collect before you begin:
1. Live Database Information
To ensure that your local WordPress site connects to the database correctly, gather the following database-related details:
- Database Name:
- Go to your live WordPress siteās hosting control panel (e.g., cPanel, Plesk) and access phpMyAdmin.
- In phpMyAdmin, find the database used by your WordPress site (usually listed on the left-hand panel).
- Take note of the Database Name (e.g.,
wp_live_database
).- Database Prefix:
- In your WordPress wp-config.php file (located in the root of your site), find the following line:
$table_prefix = 'wp_';
- The prefix is usually wp_, but it could be something else if customized. This prefix is used for your WordPress tables, such as
wp_posts
,wp_users
, etc.2. PHP Version
Ensure your local XAMPP environment runs the same PHP version as your live site to avoid compatibility issues.
- Check PHP Version on Live Site:
- You can check your PHP version from within the WordPress Dashboard by going to Tools > Site Health.
- Alternatively, you can create a simple PHP file called
phpinfo.php
and place it in your live site’s root directory with the following code:<?php phpinfo(); ?>
- Access the file through a browser (
http://yourdomain.com/phpinfo.php
) to view detailed PHP information, including the version.- Check PHP Version in phpMyAdmin:
- In phpMyAdmin, you can also see the PHP version displayed in the top-right corner of the page.
3. MySQL Version
Itās also important to know the MySQL version used by your live site, as certain versions may have different behaviors or require compatibility adjustments.
- Check MySQL Version on Live Site:
- In phpMyAdmin, click on the Server Information link at the top of the page.
- The MySQL version will be displayed in the list of server information, typically next to the PHP version.
4. WordPress Version
Ensure that your local WordPress installation matches the version of your live site.
- Check WordPress Version on Live Site:
- In the WordPress Dashboard, go to Updates (located under Dashboard in the left sidebar).
- The version number will be listed on this page, or you can check the footer of your WordPress dashboard, where the version number is often displayed.
5. Additional Configuration Information
For a smoother setup, gather these additional details:
- Permalinks Structure:
- Go to Settings > Permalinks in your live WordPress site.
- Note the permalink structure you are using (e.g., Post Name, Day and Name, etc.).
- Active Themes and Plugins:
- Make a list of your active themes and plugins. These can be installed and configured similarly on your local site to ensure consistency.
6. Server-Specific Configuration (Optional)
If your live site is hosted with custom server configurations (e.g., NGINX, custom caching, or security settings), consider documenting these so you can mirror them locally if needed. For a typical WordPress site, however, this may not be necessary.
7. Other Information
- WordPress Security Keys:
- The security keys in your
wp-config.php
file provide encryption for passwords and other sensitive data.- Ensure that you copy these values from your live
wp-config.php
to the local one if you plan to migrate or clone the site.Summary Checklist
Before you install XAMPP, gather these details from your live WordPress site:
- Database Name
- Database Prefix
- PHP Version
- MySQL Version
- WordPress Version
- Permalink Structure
- Active Themes and Plugins
- Security Keys (from
wp-config.php
)With this information in hand, you can move on to setting up XAMPP, installing WordPress, and ensuring your local environment mirrors your live site for an efficient migration or testing process.
š¾ Prerequisites | Backing Up Your Site
Before doing anything locally, it’s essential to have a manual backup of your WordPress site using the All-in-One WP Migration plugin. š§°š
Even if you’re just testing or recovering data, taking a fresh backup ensures you’re working with the most up-to-date version of your content and settings.
ā Steps for Manual Backup:
The All-in-One WP Migration plugin allows you to create a complete backup of your WordPress site, including files and the database, in just a few steps. Follow this guide to manually back up your site.
Install and Activate the Plugin
- Log into your WordPress dashboard.
- Go to Plugins > Add New.
- Search for All-in-One WP Migration.
- Click Install Now, then Activate the plugin.
Open the Export Tool
- In the WordPress dashboard, navigate to All-in-One WP Migration > Export.
- Click Export To, then select File.
Generate and Download the Backup File
- The plugin will process your siteās data into a single backup file.
- Once complete, click the Download button to save the backup to your computer.
Store the Backup Securely
- Keep the backup file in a secure location, such as cloud storage or an external hard drive.
- Ensure it is accessible for future restoration if needed.
By following these steps, you will have a complete backup of your WordPress site, making it easy to restore or migrate when necessary.
š„ļø Installing XAMPP & Setting Up a Virtual Machine
For this setup, I highly recommend using a virtual machine (VM) to run your local WordPress environment. This keeps your main system clean and isolated, and it gives you more control over software versions and configuration. š”š§±
š» Recommended: Use a Windows Virtual Machine
I used Hyper-V to create a VM and installed an evaluation copy of Windows 11 Enterprise. Microsoft typically offers a 90-day trial of this version, which works great for development and testing environments.
š Bonus Tip:
You can extend the trial period by using the slmgr.vbs -rearm
command up to three times, giving you up to 360 days of usage before reduced functionality mode kicks in.
š ļø To Extend the Trial Period:
- Open Command Prompt as Administrator.
- Run the following command:
slmgr.vbs -rearm
- Restart the VM for the changes to take effect.
š Note:
If you gathered naming conventions or configuration details earlier (e.g., site name, database name, plugin versions), it’s a good idea to match those exactly in the steps that follow. This ensures the highest level of compatibility with your backup and minimizes restoration issues.
XAMPP is a free and open-source software that provides a local server environment for WordPress development. For better security and system stability, it is recommended to install XAMPP on a Virtual Machine (VM) instead of directly on your main OS. You can use Oracle VM VirtualBox, VMware Workstation Player, or Microsoft Hyper-V for this setup.
Hereās how to install XAMPP, configure a local WordPress website, and run it from your Virtual Machine.
Install a Virtual Machine (VM)
You have three options for setting up a VM:
- Hyper-V (Windows)
- Oracle VM VirtualBox
- VMware Workstation Player
Enable Hyper-V (Windows)
- Open Control Panel > Programs > Turn Windows features on or off.
- Check Hyper-V and click OK.
- Restart your computer when prompted.
- Open Hyper-V Manager from the Start menu and create a new Virtual Machine.
Install a VM Operating System
- Create and install a compatible Windows or Linux OS inside your chosen VM software.
Download and Install XAMPP
- Go to the Apache Friends website.
- Download the latest version of XAMPP for your OS.
- Run the installer in the Virtual Machine, and follow the steps in the wizard to install Apache, MySQL, PHP, and phpMyAdmin.
Set Up WordPress
- Download WordPress
- Go to the WordPress download page.
- Download the latest version of WordPress as a ZIP file.
- Extract WordPress to the htdocs Folder
- Open the XAMPP installation folder (default is
C:\xampp\
for Windows).- Inside the XAMPP folder, find the htdocs directory.
- Extract the downloaded WordPress ZIP file to the htdocs folder.
- Rename the extracted folder to your preferred site name (e.g.,
localwordpress
).Create a Database for Your Local WordPress Site
- Access phpMyAdmin
- Open XAMPP Control Panel, and click Start next to Apache and MySQL to start the servers.
- In your browser, go to
http://localhost/phpmyadmin/
to open phpMyAdmin.- Create the Database
- In phpMyAdmin, click on Databases at the top.
- Enter a database name (e.g.,
localwordpress_db
).- Select Collation as
utf8_general_ci
, then click Create.Install WordPress
- Run the WordPress Installation Script
- In your browser, go to
http://localhost/localwordpress
(replacelocalwordpress
with the folder name you created).- WordPress will prompt you to select a language; choose your preferred language and click Continue.
- Connect WordPress to the Database
- WordPress will ask for your database information:
- Database Name: Enter the name you created earlier (e.g.,
localwordpress_db
).- Username: Enter
root
.- Password: Leave this field empty (default password for local XAMPP installations).
- Database Host: Enter
localhost
.- Table Prefix: Leave as
wp_
or change if needed.- Click Submit, and WordPress will check the connection.
- Complete the WordPress Setup
- On the next screen, click Run the Installation.
- Fill in the following fields:
- Site Title: Choose a name for your local site.
- Username: Enter
admin
or another name for your WordPress admin.- Password: Choose a strong password.
- Your Email: Enter any valid email address.
- Click Install WordPress to complete the process.
- Log Into Your New Local WordPress Site
- After installation, youāll be directed to the WordPress login page.
- Log in using the admin username and the password you just created.
Test and Access Your Local WordPress Site
- In the browser, go to
http://localhost/localwordpress/
(or the folder name you used) to view your new WordPress site.- You can now develop your site locally before moving it to a live server.
By using XAMPP and a Virtual Machine, you create a safe, isolated environment to build and test your WordPress site locally, without affecting your main operating system in an isolated development environment, protecting your main OS from conflicts and security risks.
ā»ļø Restoring Your Backups
š Importing with All-in-One WP Migration
Once your local WordPress site is up and running in XAMPP, itās time to import your backup using the All-in-One WP Migration plugin. This is the easiest way to bring your entire site ā posts, media, themes, plugins, and settings ā back to life locally. šļøš„ļø
š„ Steps to Import Your Backup:
Now that you’ve set up your local WordPress site using XAMPP, you can restore your site from a backup created using the All-in-One WP Migration plugin. This process will guide you through installing the plugin, importing the backup, and getting your site back online on your local server.
Install the All-in-One WP Migration Plugin
- Log into Your Local WordPress Site
- Open a browser and navigate to
http://localhost/your-site-folder
(replaceyour-site-folder
with the name you used for your WordPress site).- Log in to your WordPress dashboard using the admin username and password you created during installation.
- Install the All-in-One WP Migration Plugin
- In the WordPress dashboard, go to Plugins > Add New.
- Search for All-in-One WP Migration.
- Click Install Now next to the plugin, then click Activate once the installation is complete.
Import the Backup File
- Access the All-in-One WP Migration Plugin
- In the WordPress dashboard, go to All-in-One WP Migration > Import.
- Upload the Backup File
- Click the Import From button and select File from the options.
- Browse and select the .wpress backup file you previously downloaded from your live site.
- Wait for the plugin to upload and process the backup file. This may take a few minutes depending on the size of the backup.
- If you get an error about upload limit, refer to instructions below to resolve.
- Complete the Import Process
- Once the backup is successfully imported, a message will appear informing you that the import was completed successfully.
- Youāll be prompted to Save Permalinks Structure. Click the Finish button to complete the process.
Check Your Site
- Log into Your Site Again
- After the import, you may need to log back into your WordPress dashboard with your previous credentials.
- Go to
http://localhost/your-site-folder/wp-login.php
, and log in with your admin username and password.- Test Your Local WordPress Site
- Visit
http://localhost/your-site-folder/
in the browser to view your local site.- Check that everything looks correct and that all content, themes, plugins, and settings have been restored properly.
Final Considerations
- Database and File Structure: All-in-One WP Migration imports both the database and file structure, meaning your posts, pages, media, and plugins should all be restored as they were on your live site.
- Testing: Since this is a local setup, you can now freely test, modify, or develop your site without affecting the live version.
By following these steps, youāve successfully restored your WordPress site using All-in-One WP Migration on your local XAMPP setup.
š ļø Troubleshooting
ā ļø Resolving the Upload Limit in All-in-One WP Migration
When importing your backup file, you might encounter an error related to the upload size limit. This is a common issue, especially if your .wpress
file is larger than the default limit (usually 40ā128MB). š¬š¦
Don’t worry ā there are several ways to increase the limit, and you might need to try more than one method (just like I did) to get it working.
š§Ŗ Try These Solutions:
Method 1: Increase Upload Limit Using .htaccess File
The .htaccess file is used to configure server settings in Apache-based servers. If you’re using an Apache server, you can adjust the upload limits by editing the .htaccess file.
Steps to Increase Upload Limit in .htaccess:
- Access Your WordPress Site Files:
- Use an FTP client (like FileZilla) or your hosting file manager (via cPanel or similar) to navigate to the root directory of your WordPress site.
- Look for the .htaccess file. If itās not visible, make sure your FTP client or file manager is set to show hidden files.
- Edit the .htaccess File:
- Right-click on the .htaccess file and select Edit.
- Add the following lines of code to the top of the file (before any existing code):
# Increase upload size limit
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
- Save the File:
- Save the changes to the .htaccess file.
- Test the Upload Limit:
- Try uploading a larger file through the All-in-One WP Migration plugin. You should now be able to upload files up to 128MB (or your chosen size).
Method 2: Increase Upload Limit Using php.ini File
The php.ini file is the configuration file for PHP, and you can use it to adjust the settings related to file uploads. This method may work if your server allows you to edit the php.ini file, which is common in shared hosting or VPS environments.
Steps to Increase Upload Limit in php.ini:
- Locate the php.ini File:
- Access your websiteās root directory (the same as where wp-config.php is located).
- If you can’t find a php.ini file, create one yourself in the root folder or wp-admin folder.
- Edit the php.ini File:
- Open the php.ini file in a text editor.
- Add or modify the following lines (or adjust their values if they already exist):
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300
max_input_time = 300
- Save the Changes:
- Save the file and close the editor.
- Restart Your Server (If Needed):
- Some hosting environments require you to restart the PHP service for changes to take effect. If you donāt have access to restart PHP, contact your hosting provider to confirm that the changes have been applied.
- Test the Upload Limit:
- Go to your All-in-One WP Migration plugin and try uploading a file again to see if the limit has increased.
Method 3: Increase Upload Limit Using WordPress Dashboard (If .htaccess or php.ini is not possible)
If you donāt have access to the .htaccess or php.ini files, some hosting environments allow you to change the upload limit directly from the WordPress dashboard by using a plugin like WP Maximum Upload File Size.
Steps:
- Install the WP Maximum Upload File Size plugin from the WordPress plugin repository.
- After activation, go to Settings > Media.
- Increase the Maximum Upload File Size setting as needed.
Common Settings to Modify:
- upload_max_filesize: Maximum size of a file that can be uploaded.
- post_max_size: Maximum size of the entire POST request (including file upload).
- memory_limit: Maximum amount of memory PHP scripts can use.
- max_execution_time: Maximum time a script is allowed to run before it is terminated (in seconds).
- max_input_time: Maximum time for PHP to parse input data.
Important Notes:
- If you are using a shared hosting environment, your host may limit the values you can set. In that case, you may need to contact your hosting provider for assistance.
- If you can’t access either .htaccess or php.ini, contact your hosting provider and ask them to increase the upload limit for you.
ā Conclusion
Restoring a local copy of your WordPress site using XAMPP and the All-in-One WP Migration plugin is a powerful way to revisit past content, test changes safely, or recover lost data ā all without affecting your live site. š§©š„ļø
While the process is generally straightforward, small hiccups like upload limits or configuration mismatches can happen ā but with the right steps, theyāre easy to overcome. š§āØ
šæ Final Thoughts
Taking the time to set up a private testing environment not only gives you more control but also deepens your understanding of how your site functions behind the scenes.
Whether you’re restoring for reflection, recovery, or reinvention, this setup gives you the freedom to explore without fear.

My name is Dex, author at WinReflection.
I am a Christian, conservative, truth-seeker, and problem-solver who is not afraid to be vocal about important or controversial issuesāsilence leads to death. There’s more to life than the worldly status quo, and that’s why many are sad and depressedāthey’re suffocating. Truth and purpose can bring fresh air into one’s life, and that’s my mission. My sidebar content should not trigger you, the proof is all there.
šĀ John 3:16: For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Leave a Reply
Want to join the discussion?Feel free to contribute!