There was a problem loading the comments.

Migrating WordPress Blog from One Host to Another Host

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Before we proceed, it is important to note that website migration and domain transfer are two different processes.

 

I want to migrate the website myself (Manual migration)

On the other hand, if you are comfortable navigating your File Manager, database, and FTP and would like to migrate your website to your new host, please proceed with the manual migration process below, which comprises several steps.

 

Step 1: Backup your WordPress database using phpMyAdmin

Before migrating your WordPress blog, you must create a database backup using phpMyAdmin.

To create a database backup via phpMyAdmin:

 

  1. Log in to your host's phpMyAdmin.
  2. Select your WordPress blog's database name.
  3. Click Export in the top navigation menu.

    phpMyAdmin - Export tab

  4. Select the Quick option listed under the Export Method section.

    phpMyAdmin - Export - Export tables

  5. Keep the format section as SQL.
  6. Click Go.
  7. The database will start downloading. Once done, you will find a .sql file on our computer.

You have now successfully downloaded a backup of your database!

 

Step 2: Download and upload all WordPress files using FTP

You must download ALL your files from your old host and upload them to your new host. This includes files from your themes folder and plugins folder. Make sure you also download any folders that were referenced outside of your blog's folder. For example, if you use a separate folder called 'images,' located outside the blog's folder, the images must be copied and uploaded to the new hosting location; otherwise, the site will contain many broken links to images within the blog post.

Filezilla is the recommended FTP client. By default, Filezilla does not display the .htaccess file for security reasons. To ensure your .htaccess file is included in the download, click Filezilla's Server tab and select Force to show hidden files.

FileZilla - Force showing hidden files

If you neglect to upload your .htaccess file, your permalinks will not work.

 

Step 3: Create a new WordPress database and database user

Once your WordPress core files are uploaded to your WPLH server, you must upload the database (.sql) file you downloaded from your old host in Step 1 to your WPLH database. To do this, you must create a new database and database user within phpMyAdmin and assign privileges to your new database user.

 

Once you create your new database name and user, grant All Privileges to your new user.

Okay! Now, you are ready to configure your wp-config.php file.

 

Step 4: Edit the wp-config.php file

After creating a new database, you must edit the wp-config.php file, which is the WordPress configuration file. This specific configuration file reads directly from your database.

To update the WordPress configuration file:

  1. From your control panel, click the File Manager icon.

    cPanel - File Manager

  2. Navigate to your WordPress domain's document root.
  3. Locate the file named wp-config.php.
  4. Right-click to edit the file and locate the following lines to update them with the correct information.
    /** The name of the database for WordPress */   
    define('DB_NAME', 'yourdatabasename');   
    /** MySQL database username */   
    define('DB_USER', 'yourdatabaseusername'); 
    /** MySQL database password */   
    define('DB_PASSWORD', '**yourdatabasepassword**');  
    /** MySQL hostname */   
    define('DB_HOST', 'localhost');
    • If you did not edit the file on the server via the File Manager with your new database settings, upload it to the root of your blog folder.
  5. Ensure that the information you input here matches the database name, user, and password. 

The configuration file is now set up with the new database but contains no database tables. To correct this, you must import the information into the database.

 

Step 5: Importing WordPress to the new database

You can use phpMyAdmin to import your database.

To import your WordPress database via phpMyAdmin, here's a quick overview.

  1. Inside the phpMyAdmin, select the new database name from the left-hand menu.

    phpMyAdmin - Select Database

  2. Click the Import tab in the top menu.

    cPanel - phpMyadmin's Import Tab

  3. Upload the .sql file using the Choose File button on your computer, then click Go.

Once these steps are done, try accessing your site in a browser.


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA

On-Premise Help Desk Software by SupportPal
© Support Portal - WP Lighthost