Site migration via FTP

#843167
  • Resolved Adam Pražan
    Rank Math free

    Hello,

    I ran into a problem with the site migration. Classically, I copy the entire FTP + database and then execute these SQL queries in the database. Everything is copied for me, except for the settings of the RankMath plugin itself. Don’t know where the error could be?

    Here are the SQL statements:
    UPDATE wp_posts SET guid = REPLACE(guid, ‘old-domain.cz’, ‘new-domain.cz’);
    UPDATE wp_posts SET post_content = REPLACE(post_content, ‘old-domain.cz’, ‘new-domain.cz’);
    UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‘old-domain.cz’, ‘new-domain.cz’);
    UPDATE wp_options SET option_value = REPLACE(option_value, ‘old-domain.cz’, ‘new-domain.cz’);

    Thanks
    Best regards
    Adam

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing with the site migration. It seems that while your SQL queries are correctly updating the URLs in the database, they may not be affecting the settings stored by the Rank Math plugin.

    Rank Math stores its settings in the wp_options table, but it also uses serialized data which can complicate direct replacements. The SQL queries you provided will not update serialized data correctly, which might be why you’re not seeing the expected results.

    To ensure that all Rank Math settings are migrated properly, we recommend using the Rank Math Import & Export feature after migrating your site. Here’s how you can do it:

    1. After migrating your site, go to WordPress Dashboard → Rank Math SEO → Status & Tools.
    2. Click on the Import & Export tab (make sure you are in Advanced Mode).
    3. You can export your settings from the old site and then import them into the new site.

    If you have any further questions or need assistance with this process, please feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for raising this concern!

    Sources:
    Manually Install Rank Math via FTP (or SFTP) » Rank Math

    Well, is there any way to copy it only through the database itself?

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Rank Math’s data are stored in your database the way other standard plugin does – in meta and options. So, with your query, you should be able to replace the domain from the URL without any issues.

    If that doesn’t work for you, we suggest using this plugin instead: https://wordpress.org/plugins/better-search-replace/

    Let us know how that goes.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Site migration via FTP’ is closed to new replies.