Have a full backup of public_html folder of your website, The important folders inside the public_html folder are:
The important files inside the public_html folder you have to save are:
Login to your hosting account, where you have all the files saved on server:
Godaddy: (In Case if you want to migrate wordpress from Godaddy)
Go to My Account > Web Hosting > ( Select your Domain and click, ) Launch, Now you will be forwarded to the hosting panel of that particular domain.
From Options & Settings > Databases, Select MySQL. A window in lightbox mode will pop out, where you will see the list of databases.
Now Open your wp-config file to know the name of your database.
Now search your database name in the list and Click Action dropdown and select Back up,
Remember the file location where the database has been created.
Hostgator: (In case if you want to migrate your wordpress from Hostgator)
Login to your hosting account. From Databases, Go to PhpMyAdmin,
You will be redirected to the panel where all your databases are listed.
Search for the database name ( Open your wp-config file to know the name of your database.)
Click your database name, now go to Export tab. Select the SQL format, click Go
Now you have to change DNS(Domain name servers) for your website, so that you can locate the new hosting server.
Go to My Account > Domains ( Select your Domain and click, ) Launch, Now you will be forwarded to the Domain information panel of that particular domain.
On Nameservers settings click Set Nameservers,
Now just fill up your nameservers and save the settings,
It will take 3 to 5 hours to make new changes work.
After you have your new Domain name servers fixed, Just go and make a fresh install of wordpress, (You can use both the methods, manuall installation or automatic installation from your hosting panel, we recommend you the automatic installation as it is saves time).
NOTE: The automatic installation comes with a default “wp-config.php” file and it will also create a database automatically. The name username and password of your new database is stored in this new “wp-config.php” file. (You need to replace this un-used database with your old database for which you have taken the back-up in STEP: 2)
Now you have your domain working on your new hosting server, now you need to update it with your old data. For this the files, folders & database backup you have made earlier in STEP: 1 & STEP: 2 will help you out.
- 1. Before that restore all your Plugins. You can do this by installing your plugins again from your Dashboard (If you have the list of your Plugins), second method is to upload the back-up folder (taken in STEP: 1) of your plugins to the “plugins” folder (public_html/wp-content/plugins) to the exact same path where it was earlier in STEP: 1 (Path: public_html/wp-content/plugins).
- 2. Upload your “themes” & “Uploads” folders to the exact same location where they were earlier (Path: public_html/wp-content/themes & public_html/wp-content/uploads).
Now restore your database from the SQL file you have saved in STEP: 2. (Remember your fresh installation has created a default database and a user for this databse, now you need to replace your present database with your old database for which back-up was taken in STEP: 2)
From Databases Go to PhpMyadmin > Import
Once the Import process complete, it will automatically show your database name in the database list on the left side.
Next you need to create a new user with all the privileges. For this from Databases select MySQLDatabases.
Now here you will find the list of all your Databases and their users.
Go to MySQL Users, Add New User,
Just fill up the new user information, choose a strong password and username. Click Create User, in next step it will ask you to select privilleges you want to assign to the user, you can select “All” for this.
Now you have to give the access to the new user for the database you have imported in STEP: 6.
Go to Add User To Database section, Choose the new User and the new Database name from the dropdown lists and click Add.
Configure Database information in your wp-config.php file.
In this step you need to change your database name, username and password.
Download your wp-config.php file through any FTP sotware or directly from the File Manager in your hosting panel (It is more secure). Open the wp-config.php file in your text editor (Notepad) or in Dreamveawer, replace your Database name, username & password, save the file and re-upload it to the server.
Optimize your Database (This is not compulsary)
Go to PhpMyAdmin, select your Database from the list on the left side, Below the Database Tables list click Check All, now from the “With Selected” dropdown choose Optimize Table.
Access Your WordPress Dashboard & Change the permalinks Settings
Login to your Dashboard, remember the new user you have created with the fresh installation will not work (As it was saved in the default database which was there with the fresh wordpress installation, but you have replaced that database by configuring your old database in STEP: 8)
So use your old username & password to access your dashboard.
Now after restoring your old database, you’ll be able to see all your posts, pages, categories and other data.
Next you need to do is to change your permalinks settings, because you have to make all your permalinks set to the same old settings you were using earlier before the migration.
For this go to Settings > Permalinks, and set your permalinks to the same old setting you were using before the migration.
That’s it ! Now check your URL’S.