How To Manually Migrate A WordPress Website
I recently switched hosting providers and had to manually migrate all of my websites to my new server. I was able to get into a rhythm and do it relatively quick so I wanted to share my process of how to manually migrate your websites to a new hosting provider
Step One: Export Database
You are going to want to log into your your PHPMyAdmin where all of your databases are located. Find the database of the site you want to migrate and click on it.
A lot of times if you relied on a setup tool through your hosting provider then it might be named a series of numbers and letters. You can find what your database is called in the wp-config.php file of your WordPress install or you can check the wp-options table in the database and see what URL is associated with that database.
Once you are in the correct database select “Export” located in the navigation tabs. Since this is going to be a fresh import in our new database we can just use the defaults. Your database will down as a .sql file.
Step Two: Editing Your Database File
If you want to keep your database naming structure the same you can skip this part. If you want to change the name of your database to something else then you will want to open up your .sql file in a basic text editor like TextEdit (I’m on a mac). At the very top there should be three areas of where your database name is being set. Change these three areas to your new database name and then save.
Step Three: Import Your Database
Now, you will want to log into your PHPMyAdmin with your new hosting provider and create a new database. Make sure you create the database with the exact name that is in your .sql file. Once the database is created click on “Import” in the navigation tabs. Select your database file on your local machine and click “Go”.
Step Four: Create A New User
You will need to create a new user for your new database. You can use the same login credentials as before or you can create new ones. Different hosting providers have different ways of doing this but you can do this right in your PHPMyAdmin. Click on the “Privileges” tab in the navigation tabs and create a new user and assign it to your new database. Now your database is ready to go.
Step Five: Transfer your Website Files
Log into your FTP account where your website is currently located and download the entire WordPress instal to your local machine.
You will now want to open the “wp-config.php” file in your text editor and change all of the database credentials to your new database and user.
Now, log into your new FTP account and create the directory you want to upload the files into. I usually name my directories as the name of the url. For exmaple “mynewwebsite.com”. Upload your site to your new directory.
