D
D
Dmitry Pacification2016-11-27 02:04:10
Software testing
Dmitry Pacification, 2016-11-27 02:04:10

Why does the redirect work?

There is prod-site.com (production, which is developed on the WP engine).
There is test-site.com, which is located on a separate hosting, where I test everything before uploading it to prod
. Problem: when I type test-site.com into the address bar, it redirects to prod-site.com.
PS The databases and admin files are identical on the production and
PPS test in the .htaccess file exactly 0 lines of code, i.e. redirect is not registered. In the database on test-site.com, in the _options table, I
removed all references to the site prod-site.com.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maks Codov, 2016-11-27
@dmitry_pacification

Scan the project files (for example, in TotalCommander) and the database for the line prod-site.com.

D
Dmitry, 2016-11-27
@dimasmagadan

check wp-config.php
if identical add
define('WP_HOME',' example.com ');
define('WP_SITEURL',' example.com ');
for more details and some other ways to fix this, see
https://codex.wordpress.org/Changing_The_Site_URL

D
Denis Yanchevsky, 2016-11-27
@deniscopro

Try to recopy the site from prod to test using the Duplicator plugin .

D
Dmitry Pacification, 2016-11-29
@dmitry_pacification

In general, neither the solution with wp-config.php nor checking the project files for the mention of the sale, unfortunately, did not work 100%. I didn't use the Duplicator plugin.
The working option turned out to be to install the same version of WP for the test, and download all the content from the sale, changing all links through the editor.
If I changed all links without first installing WP, then the internal pages worked fine, but the redirect still worked from the face

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question