Prerequisites
Before we begin, ensure you have the following:
- A fully developed WordPress site on your local server (using XAMPP).
- Access to your live server hosting account (with FTP and a control panel like cPanel).
- The Duplicator plugin installed on your local WordPress site.
- Basic knowledge of using FTP clients and cPanel.
Step 1: Install and Configure Duplicator on Your Local WordPress Site
- Install the Duplicator Plugin:
- Log in to your local WordPress dashboard.
- Navigate to
Plugins > Add New
. - Search for “Duplicator”.
- Click
Install Now
and thenActivate
.
- Create a New Package:
- Go to
Duplicator > Packages
in the WordPress admin panel. - Click on
Create New
at the top right. - Follow the prompts and click
Next
.
- Go to
- Build the Package:
- The plugin will scan your site. Once the scan is complete, click
Build
. - This process may take a few minutes, depending on the size of your site.
- Once done, you will see two buttons:
One-Click Download
andInstaller
. Click on both to download the package (a zip file) and the installer script (a PHP file).
- The plugin will scan your site. Once the scan is complete, click
Step 2: Upload Files to Your Live Server
- Access Your Live Server:
- Log in to your hosting control panel (e.g., cPanel) or use an FTP client (like FileZilla) to connect to your live server.
- Upload Duplicator Files:
- Navigate to the root directory (usually
public_html
) where you want to install WordPress. - Upload both the
installer.php
file and the package zip file you downloaded in the previous step.
- Navigate to the root directory (usually
Step 3: Create a New Database on Your Live Server
- Log in to Your Hosting Control Panel:
- Go to the
MySQL Databases
section. - Create a new database, and note down the database name.
- Create a new database user and assign it to the newly created database. Note down the username and password.
- Go to the
Step 4: Run the Duplicator Installer
- Run the Installer Script:
- Open your web browser and navigate to
http://yourdomain.com/installer.php
. - This will launch the Duplicator installation wizard.
- Open your web browser and navigate to
- Setup the Database:
- Fill in the database details you created earlier (database name, username, password).
- Click on
Test Connection
to ensure everything is correct. - If the test is successful, proceed by clicking
Next
.
- Confirm and Run the Installation:
- The installer will now extract the files and install the database.
- Review the settings on the next screen and click
Next
. - Continue through the remaining steps until the installation is complete.
Step 5: Finalize the Migration
- Update Permalinks and Configurations:
- Once the installation is complete, log in to your live site’s WordPress admin panel using your old login credentials.
- Navigate to
Settings > Permalinks
and re-save the permalinks to ensure all links work correctly. - Check your site to ensure everything is functioning properly.
- Delete Installation Files:
- For security reasons, delete the installer files (
installer.php
, the package zip file, and any other Duplicator files) from your server.
- For security reasons, delete the installer files (
Troubleshooting Tips
- Connection Errors: Ensure your database details are correct and that the database user has sufficient privileges.
- File Permissions: Make sure the files and directories have the correct permissions to be accessed by the web server.
- Broken Links or Missing Images: Re-save your permalinks and clear your browser cache.
Conclusion
Migrating your WordPress site from a local environment to a live server is a critical step in the development process. Using the Duplicator plugin simplifies this task, making it accessible even for those with limited technical expertise. By following this step-by-step guide, you can ensure a smooth transition of your website from XAMPP to your live hosting environment, bringing your site live with minimal downtime and hassle.
For a detailed walkthrough, make sure to check out our YouTube video, where we demonstrate each step of the process in real-time. Happy migrating!