Table of Contents
Migrating your website to a new host can be stressful experience, especially when plugins designed to make the process easier don’t work as they should.
In this tutorial, I’ll be demonstrating in 5 easy steps how to manually migrate your wordpress website to another host without the need for any plugins.
Step 1: Login to your current Hosting account
For the first step of this tutorial, you’ll need access to the backend of your hosting; Typically this is Cpanel, which is found by accessing https://www.yourwebsitehere.com/cpanel, however hosting companies like Siteground & Godaddy often have their own proprietary dashboards.
We’ll be focusing on the main two components either Cpanel or dashboard have in common;
- File Manager
- phpMyAdmin
Step 2: Backing up your website files
Enter the File Manager, ensuring you’re in the root directory of your WordPress installation. Holding the Shift Key, click the very bottom of the directory list, then again all the way up to the wp-admin folder to highlight all the files and folders.
Once selected, select the “Compress” option by either clicking the button in the toolbar, or right clicking and selecting the compress option.
Select Zip Archive as the Compression Type, name the archive and press “Compress File(s)”. This usually takes time, however if it hasn’t you can’t see the Zip file; Click the “Reload” button in the File Manager taskbar to refresh to directory contents.
Once completed, you’ll need to download the compressed zip file by selecting it and clicking the Download button in the taskbar, or right clicking and selecting Download from the menu.Ready To Get Started?
Request a Quote
Depending on the size of your media uploads folder, this could take some time. While this download is underway we can begin the next step and make a copy of your database.
Step 3: Downloading a copy of the Database
In an effort to be thorough, first we want to identify the specific database that your WordPress installation is using. In the File Manager, find the wp-config.php and view the file.
/** The name of the database for WordPress */ define( 'DB_NAME', 'hosting_databasename' );
Once we have identified the name of the database, we can now access phpMyadmin via Cpanel or Dashboard; remembering to select the WordPress database on the left hand sidebar and clicking the Export button in the top menu.
Once on the Export page, the default selections “Quick” as the Export Method and Format as SQL is sufficient to proceed. Click the Go button to export and download the database, remembering where you’ve saved it on your computer.
Once FTP transfer of your files and the database expor have both completed, you are ready to move onto the next step.
Step 4: Upload the Zip file and Database to the new Host
Login to your new host and using the File Manager; upload the zip file and extract it to the root directory.
The next step however, is where some people can get stuck. We need to setup a new empty database and assign a user to it, so we can import the contents of our previous database.
Using the “MySQL Databases” button in the Cpanel/dashboard section of your hosting, create a new database and user, then add the user to the database with all permissions set, (Alternatively, “MySQL Databases Wizard” will work as well.) whilst remembering to take note of the database, aswell as the username & password. We’ll need to add this to our wp-config.php file later. Alternatively, “MySQL Databases Wizard” will work as well.
Go to phpMyAdmin, select the newly created database and by using the “IMPORT” tab on the top menu tab, import the SQL file we downloaded from our previous host
Step 5: Update the wp-config.php file
Go to your File Manager on the new host, navigating to the wp-config.php file. Right click and select “edit”
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', '*************' ); /** MySQL database username */ define( 'DB_USER', '****************' ); /** MySQL database password */ define( 'DB_PASSWORD', '******************' );
Conclusion
You’ve now successfully migrated your website over to the new host; all that needs to be done now is to change the Domain Name Servers on your domain registrar. If you’re moving to a completely different address, you’ll need to access the _options table in the database and edit the domain URL under “siteurl’ & “home”.
To ensure all internal links and media are pointing to the correct address, I recommend using “Better Search Replace” to perform a search and replace from the old domain to the new.