Missed directories on the server

Asked

Viewed 44 times

-1

I have a client website running on cPanel and a new version was developed (before 2013, now 2014) with a whole different system. It was used Wordpress to mount the site, and the previous was "deleted(zipped)" from the server, but when typed www.sitedocliente.com.br enters the "2013 version" that is no longer in the folder 'public_html' and when typed http://sitedocliente.com.br (without www) falls in "2014 version". I checked the redirects and there are none, have idea of what might be happening?

  • What is the IP address without www pointed to? It is on the same server?

  • Yeah, they’re on the same server

  • 1

    It remains to look at the http server configuration to understand which folders it serves each address then.

  • Forgive my ignorance, but where do I locate these settings?

1 answer

1

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.