How To Move Your WordPress Sites To Different Hosts
This is might be my penultimate or the last blog before this year of 2014, well still i might be coming up with one-or-two blog before. Today, i will be covering up on how to move your WordPress site to different hosts from the existing one. Let me tell you that this seems to be a trickier one than moving from sub-directories to the main domain. You might be tired out with the existing host and interested to move your WordPress site to a new host.
Back up your site
So in the first step you should take a backup of your WordPress site and copy your themes files and folders to your new host by using FTP or SFTP especially with FileZilla. Not to forget the hidden files including .htaccess
Exporting your Database
To export your database, you need to log into your cPanel and go to phpMyAdmin. Now select the database for your WordPress site and click the “Export” button, you can find this button on top of the page. Leave the default “Quick” option selected and click “Go” to download the database to your local machine.
Creating A New Database in your new host
To create a new database for your WordPress site on your new host’s server, simply log into your new server cPanel and go to MySQL Database. Now create a database and a new MySQL user. After this note down your database name, username and password for later usage.
Editing your wp-config.php file
You might be knowing nr not may be that the database information will be different on the new server and you need to update your’s wp-config.php file. So first take a backup of your old wp-config.php file and keep it in safe location in your local machine. It’ll be helpful if something goes wrong with your wp-config.php file. In the new file you need to update your WordPredss database name, username and password.
Now find the line like this,
define(‘DB_NAME’, ‘db_name’);
Enter your new database name by replacing db_name and after this now find the line like this
define(‘DB_USER’, ‘db_user’);
Here you need to enter your database username in place of db_user and in the next step find the line like this
define(‘DB_PASSWORD’, ‘db_password’);
Just replace db_password to your new database password.
Importing your database
Well now the database is up and running and now you need to import SQL file that we exported little while ago. Just open up your phpMyAdmin in your new server cPanel. Select your new database and click the “import” button. Under “File To Import” just pick your database file that you downloaded a little while ago. In the “Partial Import” section, un-check “Allow the interruption of an import in case the script detects it is close to the PHP timeout limit” and then click “Go.” After a little while, depending on the size of your file, you’ll get a confirmation message that the file has been successfully imported.
Uploading WordPress files to your new server
The next important step that you would like to take it, just upload your site files to your new server host by using your FTP or SFTP. Just navigate yourself to the place where you have installed your WordPress core. If you want your site in the root directory of your site’s domain, then copy your files to the public_html folder. After moving your site files just keep it in safe place as the backup purpose.
Comments
No comment yet.