This is because WordPress saves the site address in the database.
You can sort this directly into the database by changing the siteurl
and home
fields to the new address in the wp_options
table (note that the wp_
prefix may vary with your installation).
No problem if you do not have access to the database or for some reason do not know how to do it, because you can also correct this by the wp-config.php
file by adding the following code below the require_once(ABSPATH . 'wp-settings.php');
line:
update_option('siteurl', 'URL_DO_SITE' );
update_option('home', 'URL_DO_SITE' );
Once you have done this, just go to the site once and remove these two lines (remove them, otherwise it will change in the database every time the site is opened).
There is also another alternative for this, in case you override what is saved in the database using wp-config.php
, set the WP_SITEURL
and WP_HOME
settings.
In case you can add this way before the comment:
/* Isto é tudo, pode parar de editar! :) */
As for example:
define( 'WP_SITEURL', 'URL_DO_SITE' );
define( 'WP_HOME', 'URL_DO_SITE' );
References:
link
link
link