Missing addresses on the server

-1

I have a client site running on cPanel and a new version (before 2013, now 2014) has been developed with every different system. Wordpress was used to build the site, and the previous one was "deleted (zipped)" from the server, however when typing www .sitedocliente.com.br enters the "2013 version" that is no longer in the folder 'public_html' and when you type link (without the www) falls in the "2014 version". I checked the redirects and there are none, do you have any idea what might be happening?

    
asked by anonymous 05.04.2014 / 18:39

1 answer

1

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

    
06.04.2014 / 07:24