I copied my site: www.old_site.com
to a new address: www.new_site.com
All links in new_site point to the old site.
What do I have to change so that new site points to new site? Thank you.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
What web addresses are in your Dashboard > Settings > general? if it is the old site, try changing it, if changing is impossible, try putting the following code at the top op wp-config.php:
Are the site urls correct? Try searching your page template and see if you have still some old links in there. You can replace the old url from links from the old site with by :
<?php bloginfo('siteurl'); ?>
Please refer to this link
It is possible to set the site URL manually in the wp-config.php file.
Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.
Use this plugin for change old domain to new domain name.
If you're still having issues with this and you've changed the URL in the wp-config file, it could be that your database has posts pointing to the old URL. The tool I use, when migrating a WordPress installation, is dbreplace2.
You'll go to the link, download the php file, upload it to your server via FTP, and then go to the appropriate URL of that file in your browser. USE CAUTION WITH THIS FILE! That cannot be stressed enough. You'll basically follow the instructions of the file and enter your old URL into a field and a the new URL into another field and it will go into the DB and replace all of the instances of the old, with the new. Make sure everything is entered correctly or you'll have a huge headache on your hands. Also, be sure to remove the file from the server once you're complete as it has access to your DB directly.