Migrating a WordPress website to a new hosting environment can seem daunting, but with a structured approach, it's a manageable process. This guide provides a detailed, step-by-step walkthrough for manually migrating your WordPress installation to a Plesk server. This advanced procedure ensures that all your website files and database are correctly transferred and configured, allowing your site to operate seamlessly on its new host.
Prerequisites for Migration
Before beginning the migration process, ensure you have the following essential components readily available:
- A complete backup of your WordPress website's files. This typically includes folders like
wp-content
,wp-includes
,wp-admin
, and all root files. - A full backup of your WordPress SQL database. This is usually a
.sql
file containing all your website's data. - Your Plesk server login credentials, which include your username and password.
Step-by-Step Migration Process
1. Uploading WordPress Files to Plesk
The first crucial step involves transferring your WordPress site's files to your Plesk hosting environment. This ensures all your website's assets, themes, plugins, and core WordPress files are in place.
- Begin by logging into your Plesk control panel.
- On the left-hand navigation menu, select Files.
- Navigate into the
httpdocs
folder. This directory is typically where your primary website content should reside.
- Within the
httpdocs
folder, click the Upload button. - Proceed to upload all your backed-up WordPress files into this directory. Ensure that core WordPress folders such as
wp-content
,wp-includes
, andwp-admin
, along with other essential WordPress files, are placed directly inside thehttpdocs
folder.
2. Identifying Database Configuration
Your WordPress website relies heavily on its database. Before setting up a new database in Plesk, you need to retrieve the existing database credentials from your WordPress configuration file.
- While still in the
httpdocs
folder in the Plesk File Manager, locate and double-click thewp-config.php
file. This action will open the file for editing or viewing. - Carefully note down the MySQL database settings, specifically the values for
DB_NAME
,DB_USER
, andDB_PASSWORD
. These credentials are vital for connecting your WordPress installation to its database.
3. Creating a New Database in Plesk
With your WordPress files uploaded and database credentials noted, the next step is to create a new database within Plesk that will host your WordPress site's data.
- From the main Plesk left-side menu, click on Databases.
- Then, select the Add Database option.
- Fill in the database details using the information you gathered from the
wp-config.php
file in Step 3 (DB_NAME, DB_USER, and DB_PASSWORD). - It is crucial that the database name and username you create here match those specified in your
wp-config.php
file. If they differ, you will need to edit thewp-config.php
file to update the credentials to match the newly created Plesk database. - After entering all details, click OK to create the database.
4. Importing Your WordPress Database
Once the database is successfully created, you must import your backed-up WordPress SQL database into this new Plesk database.
- With the database created, locate and click on the Import Dump option associated with your new database.
- Upload your WordPress SQL database backup file. This process will populate your new Plesk database with all your website's content, user information, and settings.
5. Integrating with WordPress Toolkit
Plesk's WordPress Toolkit offers convenient management features for your WordPress installations. Scanning your site with the toolkit allows you to leverage these benefits.
- Return to the main left-side menu and click on WordPress.
- Then, click the Scan button. Plesk will then detect and add your newly migrated WordPress installation to the WordPress Toolkit, making it easier to manage going forward.
Verifying Your Migration
After completing all the migration steps, it's essential to verify that your website is functioning correctly on the new Plesk server before making it live to the public. A common method for private previewing is to modify your local hosts file. This allows you to view your website on the new server's IP address without changing your domain's DNS records, preventing any downtime for your visitors.
Finalizing Your Migration
With your WordPress installation successfully imported and verified on your Plesk server, the final step is to direct your domain's traffic to the new server. This involves updating your Domain Name System (DNS) records to point to the IP address of your Plesk server. Once the DNS propagation is complete, your website will be fully operational from its new Plesk hosting environment.