D
D
Dmitry2016-09-23 16:11:11
open server
Dmitry, 2016-09-23 16:11:11

Why does it redirect to the local server?

Hello. Transferred the site from Open server to hosting. Based on Wordpress.
Transferred the contents of the root folder on the local to the root folder on the hosting. Moved the database.
Changed wp-config.php in root. Plus made a request to phpadmin:

UPDATE wp_options SET option_value = replace(option_value, 'http://localhost/имя_сайта_на_localhost',

'http://newdomain.ru') WHERE option_name = 'home' OR option_name = 'siteurl';

when I go to the site address on the hosting, it redirects me to the local server.
What did you do wrong?
Thanks in advance.
PS: They advised me to change three fields in the local settings:
WordPress address (URL)
Site address (URL) Changed the
name of the site
, reloaded the database and the site, and everything worked. The only problem is that now when I try to access the same site on the local server, it redirects me to a web address.
Change fields in wp-options via request
UPDATE `wp_options` SET option_value = 'http://адрес-вашего-сайта.ru' WHERE option_name IN ('siteurl', 'home');

gave no result.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Yanchevsky, 2016-09-23
@ddimonn8080

Hello.
Try to use the Duplicator plugin for transfer . He usually carries it right.

A
ant1vit, 2016-09-23
@ant1vit

Look at the old paths in the wp_options database, maybe there is a local address left there, the address is written in two places

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question