Support » Fixing WordPress » Migrating WordPress

  • Hello everyone, I hope somebody is going to be able to cast some light on this one.

    I have been working with a hosting company that has both a windows and a linux server. My old site was on the windows server and it is still running. In the meantime I have been working on a new site in the linux server, using wordpress.

    Everything is cool so far. When I am ready all I need to do is change the pointer of the server from the current site to the one in the linux environment. I decided to move forward this way because the current site needs to be active while I am working on the new one.

    Currently all the pages in my site start with lnx. instead of www, this is the only way I can work on it. Once the domain will be directed to the linux server these URLs will have to start with www. which means that while I am not migrating wordpress at all, all my links will need to be changed.

    I read all I could find in the codex pages and also asked several questions to the tech support of the hosting company. According to them what I have to do is back everything up for safety, then export MySQL tabs, use a text editor to search and replace all lnx with www and then import the modified database. According to them this will fix it all.

    I was cool with it until I read the article on this website regarding “Moving WordPress” and issues related to the serialization of the URLs that a search/replace system can mess up with. (http://codex.wordpress.org/Moving_WordPress)

    People at tech support of the hosting company insist that the method is safe. I have A LOT of links in this website. Also, I am using a child theme and am personalizing some plugins.

    So, before I seriously mess up almost two months of work I am hoping that someone can help me figure this out in a clear way!

    Thanks!
    Platt

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,To migrate WordPress you have to follow these steps.

    1.Download files from the existing server.
    2.Download SQL file from the phpmyadmin and make a backup of it.
    3.Open the SQL file using notepad or some other editor.
    4.Find your old site path and replace it with newsite path
    5.Now import the SQL file to your newsite database
    6.Update your wp-config file
    7.Now login to WP-admin and update the permalinks.

    By this way you can update all your internal links of the website.You need not update them seperately.The only links you have update is the links in php files.

    Much easier way than your tech support offered

    Use velvet blues plugin.

    http://wordpress.org/plugins/velvet-blues-update-urls/

    This will go through all your database and do a search/replace without the pain of editing MySQL.

    HOWEVER do take a backup of the database first.

    You’ll also need to change two items in WP-options table once live

    In phpmyadmin go into sql and enter the following

    UPDATE wp_options SET option_value = ‘http://www.mysite.com’ WHERE option_name IN (‘siteurl’, ‘home’)

    where http://www.mysite.com is your new url

    wpismypuppet

    (@wordpressismypuppet)

    I wrote an in-depth method for how we do it at my company. The article is here:

    http://www.designprinciples.com/how-to-migrate-a-wordpress-installation-to-another-domain/

    [ Moderator note: when possible please use the Codex versions instead of posting to your own site. ]

    It’s a lot to read, but that’s only because I explain in detail what’s happening and why you do certain steps. When broken down, it’s a very short and simple process.

    There are plugins, as Robin mentioned, that will do some of the work for you… but they aren’t fool proof as they don’t do all the necessary work. Even Robin admits that you have to know a little SQL to finish the job. The method in my article is one I do on a daily basis, so I can guarantee it works, and works well!

    Nice article wpismypuppet, really useful

    Though wouldn’t knock the plugins route, velvet blues does all that Search Replace DB does except the last sql bit which is easy to do, and is just as efficient. Both get the job done !

    Thread Starter theotherplatt

    (@theotherplatt)

    Thank you all, I knew of the Velvet Blues plugin even though I never used it. I will look deeper into your suggestions and hopefully things will transition smoothly.

    @robin : I didn’t understand if I need to copy paste that code AS IS except for the URL, or if those commends you wrote in all caps are supposed to be changed with something else:

    UPDATE wp_options SET option_value = ‘http://www.mysite.com’ WHERE option_name IN (‘siteurl’, ‘home’)

    as is except the url !

    Thread Starter theotherplatt

    (@theotherplatt)

    Thank you gentlemen!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Migrating WordPress’ is closed to new replies.