How To Transfer A WordPress Installation To A New Hosting Account
Ever wanted to change your hosting company but were afraid it might mess up your WordPress site? If your comfortable with FTP and know a little bit about creating databases and phpmyadmin then your good to go.
Follow our step by step guide and you will have it done in no time. **This is not for beginners.**
Create a folder on your desktop and name it “My WordPress Installation”.
Open your FTP client (we use FileZilla) and login to your WordPress installation. You should see a directory of content on the right panel like we have outlined in red in the image below.
This content is your WordPress installations root directory. On the top left panel of FileZilla, navigate to your desktop and open your “My WordPress Installation” folder by double clicking it.
Select all the files and folders from your WordPress root directory that we have highlighted in red and simply drag and drop them into your “My wordpress Installation” folder on the bottom left panel of FileZilla.
Your files and folders should now start transferring from your hosting to your folder on the desktop.
Once all your files and folders have finished transferring, open your “My WordPress Installation” folder on your desktop. You should see a file called wp-config.php double click on this file to open it.
Once you have your wp-config file open in Sublime, you will need to find the name of your current database which we have highlighted in red below.
Only copy YOUR DATABASE NAME without the apostrophes ”
**You will need a text editor to view this file, we recommend using Sublime Text Editor which is free to download.**
Now that you have your WordPress root directory downloaded and you know the name of your current database, its time to export your WordPress database. This can be done by opening phpmyadmin from your cpanel.
With your phpmyadmin page now open, you need to select your database by clicking your database name which we just got from the wp-config file from the dropdown menu on the left.
With your database name selected, next you need to export it. Simply click on the export tab then click go. Your database file will then download to your downloads folder.
With your WordPress installation and database downloaded, its time to login into your new hosting cpanel and open MySQL Databases.
Once you have opened MySQL Databases you will need to create a database name, then username and password. The database name can only be seven characters long.
**At this point make sure you take note of your new full database name, username and password.** Once you have this done, add the username you just created to the database you just created, see below.
Well done on getting this far. You have now created a database which we are going to use for your WordPress installation transfer. Now go back to cpanel on your new hosting and open phpmyadmin.
From the phpmyadmin page, you want to import the database you downloaded into the new one you created on your new hosting see below.
Open up your wp-config.php file again with Sublime Text and now enter your new database name, username and password that you took note of earlier then save your changes.
Next open your FTP client (FileZilla) and login to the WordPress root directory of your new hosting, it should be blank, see below.
From the top left panel, open your “My WordPress Installation” folder and drag and drop all the files and folders into the panel on the right and it will begin to upload your files.
When completed you will have successfully transferred your WordPress installation and database over to your new hosting. The last thing you need to do is change the name servers on your domain name from your old hosting name servers to point to your new ones. We will do another post for that soon.