Symptoms
-
WordPress is installed on the domain example.com on the Plesk server.
-
The domain example.com is resolved not to the Plesk server – the production version of example.com is working on another server.
-
On the Plesk server, the domain is created for developing the new version of the website.
-
On the Plesk server, in the WordPress dashboard of example.com in Settings > General, the options WordPress Address (URL) and Site Address (URL) are set with
https://
– https://example.com. -
When accessing the WordPress login page using Plesk website preview at http://203.0.113.2/plesk-site-preview/example.com/203.0.113.2/wp-login.php, it is redirected to the production website https://example.com/wp-login.php.
Cause
The options WordPress Address (URL) and Site Address (URL) in the WordPress dashboard are set with https://
.
Resolution
-
Edit the hosts file on your PC so the website example.com is loaded from the Plesk server.
-
Log into the WordPress dashboard of example.com hosted on the Plesk server.
-
Go to Settings > General.
-
Change the values of the options WordPress Address (URL) and Site Address (URL) to http://example.com.
-
Click Save Changes.
Additional information
[FIXED BUG] Website preview URL is automatically redirected to the main website URL