• I built a test site for my domain nuisbe.org at devtest2.nuisbe.org. To deploy the test site to the live site, I renamed the SQL database from the devtest2 and updated info for that in the wp-config file of the main domain. I also used an FTP to transfer all files over whilst deleting the old ones. The new site is live but all buttons/images still link to the devtest instead of the main domain. I ran these 4 SQL queries but that did not fix the issue.

    UPDATE wp_options SET option_value = replace(option_value, 'https://devtest2.nuisbe.org', 'https://www.nuisbe.org') WHERE option_name = 'home' OR option_name = 'siteurl';
    
    UPDATE wp_posts SET guid = replace(guid, 'https://devtest2.nuisbe.org','https://www.nuisbe.org');
    
    UPDATE wp_posts SET post_content = replace(post_content, 'https://devtest2.nuisbe.org', 'https://www.nuisbe.org');
    
    UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://devtest2.nuisbe.org','https://www.nuisbe.org');

    Any ideas on what to fix?

Viewing 3 replies - 1 through 3 (of 3 total)
  • What you should have done was install WordPress in the root domain, export the WordPress data (using a plugin like WordPress Importer), and then upload the images (in the UPLOADS directory) to the new WordPress, then run the import.

    What you also could have done was export the SQL data (via myPHPadmin or whatever SQL dashboard you use) and then import it to a new table for the root domain. But you might still have pathing issues (which is why I use the plugin to export/export WordPress sites).

    Now you have gummed up the works. If you have a backup of your SQL database you should restore that and start over.

    You don’t need to do any importing/exporting/etc. ??

    Use this script to replace the sub-domain with the main domian. It will go through all of your database tables and re-name everything for you.

    And there is no warranty or support provided for that script. Inexperienced users should not be directed toward such tools.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SQL Queries Are Not Changing Subdomain to Domain’ is closed to new replies.