Presentation is loading. Please wait.

Presentation is loading. Please wait.

Migrating Wordpress Migrating Wordpress can sometimes get more complicated as it should. There is no plugin that does this for you, the best way is to.

Similar presentations


Presentation on theme: "Migrating Wordpress Migrating Wordpress can sometimes get more complicated as it should. There is no plugin that does this for you, the best way is to."— Presentation transcript:

1 Migrating Wordpress Migrating Wordpress can sometimes get more complicated as it should. There is no plugin that does this for you, the best way is to just to do it manually. On this tutorial I will show how to migrate a Wordpress installation from test server account to another hosting account. I have already made a backup of the database and files and these are ready to be uploaded to the new hosting account. If you don’t know how to make a backup of a wordpress installation, you can check the Backing Up Wordpress document.

2 We will migrate the Wordpress installation from Moonlight test server http://74.54.139.179/~mltest/ to moonlight-staging.com domain. http://74.54.139.179/~mltest/ These are both hosted on Hostgator but using different accounts. So basically I will migrate from one hosting account to another. Test Wordpress website

3 So we have downloaded the backup from our website, next we need to access the Moonlight-staging Cpanel and create a new database and new Wordpress installation. You can follow the steps on the Installing Wordpress document. Next extract the wp-content folder and the database.sql file from you backup zip file

4 Then replace the wp-content folder on your Moonlight-staging.com Wordpress installation with the one you extracted from the backup. You can do it with Filezilla or with the Cpanel file manager. wp-content folder has all the theme files, image uploads, plugins… Basically whatever modifications you do on Wordpress they will be always stored in this folder. When migrating Wordpress this is the folder you need to copy - replace to your destination Wordpress installation. In some cases you might want to migrate whole Wordpress installation with all the files and folders but most often this is unnecessary

5 If we go to moonlight-staging.com URL, we can see that nothing has changed there after replacing the wp-content folder. Go to your Moonlight-staging.com Cpanel -> Databases -> phpMyAdmin The destination Wordpress installation still looks the same after updating wp-content folder. phpMyAdmin on Cpanel

6 On the phpMyAdmin panel choose your Wordpress database from the left sidebar. If there are many databases, make sure you choose the correct one. This is the database of the destination Wordpress installation. In order to migrate all the content from the http://74.54.139.179/~mltest URL.http://74.54.139.179/~mltest We will need to replace the database here.

7 On the next screen you can see all the tables in the database. Click Check All and choose Drop from the “With selected” dropdown menu Click Yes on the next “Do you really want to” screen.

8 A confirmation screen after deleting all the tables Now that the database is empty, we can import the database from our backup of the http://74.54.139.179/~mltest/ site.http://74.54.139.179/~mltest/ On phpMyadmin panel – choose Import tab from the top menu Then Choose File on the next screen. And choose the backup database sql file. Backup Database file on your computer

9 Keep all the default settings as they are and click Go to start importing the database

10 You will see a confirmation “Import has been successfully…” And we are done with importing the database. Now, if you go back to Moonlight-staging.com URL on your browser. You can see that the website looks exactly like it suppose to and all the content is there! But hold your pants,,, if you click on one of the image links or the menu links, it will take you to the old Wordpress URL…

11 The reason why the link URLs are taking you to the original Wordpress site is that the links haven’t been updated yet in the database. It is very important to remember to search and replace the URLs, in this case http://74.54.139.179http://74.54.139.179 with the new URL http://moonlight-staging.com.http://moonlight-staging.com There are 2 ways of doing it. You could do it before importing the database sql file by opening it with Notepad++ and then do Search http://74.54.139.179 and Replace all withhttp://74.54.139.179 http://moonlight-staging.comhttp://moonlight-staging.com and then import the database to phpMyadmin, just like we did earlier. The other way to do it, is to upload the database first and then replace the URLs by using a special script found here: Search and Replace tool.Search and Replace tool So let’s see how it actually works. First, download the search and replace tool from here and unzip it to your computer.here Unzip the searchreplacedb2.php file

12 Next, open Filezilla FTP client and connect to the Moonlight-staging FTP. Go to public_html folder, or whatever is the root folder of your Wordpress installation. Copy the searchreplacedb2.php there. Once the searchreplace2.php file is on the server, go to yourdomain/ searchreplace2.php. In this case it is http://moonlight-staging.com/searchreplacedb2.phphttp://moonlight-staging.com/searchreplacedb2.php

13 Then you will see a screen asking Load DB connection… Continue by clicking Submit On the next page you will see a database information that gets populated automatically. You don’t need to change these. Click Submit DB details to continue.

14 Then choose all the Tables from the list below and click Continue Click OK when the confirmation w/dow pops up

15 And then come the most important part. On the Search for field we need to add the old Wordpress URL and on the Replace with field we will add the new URL location of the Wordpress. Then click Submit Search string !IMPORTANT Make sure you only replace the URL string that is necessary. E.g. here we only add http://74.54.139.179/~mltest/ without http:// So the replacing string should also be: http://moonlight-staging.com/ without http:// Also make sure that there is no slash / at the end of the URL string.

16 The Database has been updated with the new URLs (moonlight-staging.com) Now, clear your browser cookies (Refresh) and go to the new Wordpress URL. Test any of the links, and they should pointing to moonlight-staging.com/…

17 Once the URLs are working, go back to your FTP Filezilla and delete the searchreplacedb2.php file. This is very important to remember. Leaving the file to your server makes the Wordpress installation vulnerable to attacks. That’s all folks, we have finished migrating Wordpress from one hosting to another ! Check the next slide for added notes!

18 Sometimes your permalinks might not work after the Wordpress migration and you will get 404 page not found error. To fix this, login to your Wordpress backend Dashboard and go to Settings -> Permalinks and change it to Default and Save Changes. After this check again and the website links should be working. Then you can change the permalinks back Post name or whatever you had before.


Download ppt "Migrating Wordpress Migrating Wordpress can sometimes get more complicated as it should. There is no plugin that does this for you, the best way is to."

Similar presentations


Ads by Google