This happens because Wordpress saves the site address in the database.
It is possible to arrange this directly in the bank by changing the fields siteurl
and home
to the new address in the table wp_options
(note that the prefix wp_
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, as it is also possible to fix it by the file wp-config.php
adding the following code below the line require_once(ABSPATH . 'wp-settings.php');
:
update_option('siteurl', 'URL_DO_SITE' );
update_option('home', 'URL_DO_SITE' );
Once this is done, simply access the site once and remove these two lines (remove them, otherwise this will change in the database every time the site opens).
There is also another alternative to this, in case it is overwrite what is saved in the database using the wp-config.php
, configured the settings WP_SITEURL
and WP_HOME
.
In case you can add this way before the comment:
/* Isto é tudo, pode parar de editar! :) */
For example:
define( 'WP_SITEURL', 'URL_DO_SITE' );
define( 'WP_HOME', 'URL_DO_SITE' );
References:
http://codex.wordpress.org/Moving_WordPress
http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29
http://codex.wordpress.org/Editing_wp-config.php#Blog_address_.28URL.29
What is the IP address without www pointed to? It is on the same server?
– Bacco
Yeah, they’re on the same server
– Bruno Martins
It remains to look at the http server configuration to understand which folders it serves each address then.
– Bacco
Forgive my ignorance, but where do I locate these settings?
– Bruno Martins