Search code examples
wordpressphpmyadminmigrationsubdomainshared-hosting

Internal links still point to development subdomain?


I moved a wordpress site from a subdirectory http://www.development.example.com to the root public_html directory. I have updated the site & home urls to http://www.example.com and verified in phpMyAdmin in the control panel. The header links to other pages work as expected but my internal jump links on the home page such as http://www.example.com/#about still point to the subdomain link http://www.development.example.com/#about. Is there another place in the admin dashboard or directly in the database that I can check for necessary url changes to resolve this?


Solution

  • You might try a couple things.

    1.) Add the following to your wp-config.php file:

    define('WP_HOME','http://yourdomain.com');
    define('WP_SITEURL','http://yourdomain.com');
    

    2.) If you have (SSH) access to WP CLI, you can run this in your site root:

    wp search-replace oldomain.com newdomain.com
    

    3.) Try the Better Search Replace plugin.