WordPress.org

Ready to get started?Download WordPress

Forums

Migrating WP to Another Server (4 posts)

  1. chunky2010
    Member
    Posted 1 year ago #

    Hello,

    First, I am not a DB Admin. I mostly do WordPress custom theming and functionality configs. I only know enough to get the job done, such as setting up a new cPanel account, moving a completed site manually to a new server, etc.

    In an effort to become more efficient, I'm using the Migrate tool in WHM to move a completed WordPress website from our dev server to our production server. This process is new to me, as I used to move sites manually.

    :: The migration tool is easy to use and works well. No problems here.
    :: The Modify Account tool works well too. I can change for example, "myDevSite.thewebsite.com" to "clientURL.com" and the website homepage comes up in the browser. However, anything beyond the homepage links back to the dev site.
    :: If the domain doesn't need to change, the Migration tool works awesome.

    So, it would seem the problem is that the Modify Account tool doesn't seem to modify all (or any?) tables in the database. Normally if I go through the process of moving a website manually, I create a new cPanel account, new DB, insert dev DB contents into new DB, then modify the database using this:

    UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    
    UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
    
    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
    But it seems when using the Migrate method even if I use that code on the database after migration and re-naming, it seems to have a negative impact on the site, as it now throws a ton of errors and does not display properly.

    So, my questions is:

    1. Using the Migrate/Modify Account function method, how can I modify the database so that the correct domain is called? In other words, my goal is to move a site from the dev server to the production server and make it run using the client's url.

    Thanks very much,

  2. CliffAscent
    Member
    Posted 1 year ago #

    Are you running multisite? If so, you need to change 5 areas.

    wp_options >> siteurl
    wp_options >> home
    wp_blogs >> 1
    wp_site >> 1
    wp_sitemeta >> 14

    and your config file. Don't forget to check the config file and htaccess!

  3. chunky2010
    Member
    Posted 1 year ago #

    No, not multisite, just a regular WP install.

    The issue is that the url must change.

  4. Krishna
    Volunteer Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic