Wordpress - 将HTTP请求发送到错误域的插件

Back story- I have a site up and running fine with up-to-date wordpress & woocommerce. The owner wanted to re-do all of the products & to get a new domain name; since the old site is working fine & he has customers placing orders daily, I made a copy of the website using godaddy's installatron & assigned it a subdomain name. Everything was working fine, i thought.

While installing new plugins (Woocommerce, WP All Import, etc.) I am noticing that all the plugins' HTTP requests are being made to the old domain name. The old site is still live so many requests actually still make it just fine, but new plugins aren't working because they are trying to get JS files from the old domain (not the new one).

I've tried setting the WP_CONTENT_URL to the current domain explicitly but it doesn't change the request's location.

Any ideas of issues that could have arisen from the site transfer or the hosting? I'm currently running a grep on the WP files for the old domain name but it's gonna take a while.

Before you begin with this, make sure that you have a backup of your database just in case.

If you have access to the SSH of the Wordpress files, you may use WP CLI. Try running the command below to check if there are replacements:

wp search-replace 'old_url' 'new_url' --dryrun

If there are replacements, that means that you can change the old_url to the new url. Just remove --dryrun to proceed with the changes.

Ended up figuring it out-when I said I had set the WP_CONTENT_URL, I was doing so at the end of the wp-config file, after constants had already been defined. Moving it up before the following line fixed everything:

if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/')