Transfer a Site to a Different Hosting Provider - mergeweb/docs GitHub Wiki
There are several different approaches, and all will depend on the new hosting provider. However, most importantly, all theme files, wp-config.php, database files, and DNS records must be transferred.
The required materials to transfer are:
- Theme Files (at the very least everything in the
wp-content/directory wp-config.php- Database files
- DNS records
Export Database Files
- Navigate to the website's phpMyAdmin
- Select the site's database
- Scroll down and select "Check All"
- Select Export to select all files.
Transfer All Files to New WordPress Site
Once a new instance is of WordPress is installed through the client's hosting provider, you will need to move the theme files and database into the new site.
Transferring files can be down a variety of ways. Depending on the hosting provider, file transfer can be down through FTP/SFTP or cPanel. At the very least, the wp-content/ directory and wp-config.php should be uploaded in the root directory of the website.
Transferring files through FTP/SFTP can be down through FileZilla. For more information, click this link.
If transferring files through cPanel, navigate to the File Manager and replace existing files with the old site files.
Updating The Database
Navigate to the new site's phpMyAdmin. Click on the database, select all, and Drop all tables. Then select Import and import the previously downloaded database files. Double check the site URL and home URL are the new WordPress's URL so it can be accessed before switching DNS records. This will be changed once the custom domain name is pointed to the new website.
DNS Records
The new site will need to have the DNS records pointed. This can be done in several ways, but ideally the client will handle pointing the DNS records.
For more information on how to transfer a site, here is a video resource.