Plesk for Linux
kb: technical
ABT: Group B
Applicable to:
- Plesk for Linux
Symptoms
-
When opening a WordPress website in Plesk Site Preview, the page gets redirected from http://203.0.113.2/plesk-site-preview/example.com/203.0.113.2/ to https://example.com.
-
The .htaccess file does not contain any redirection rules.
Cause
Redirection is performed inside WordPress.
Resolution
Disable redirection in WordPress. Check WordPress plugins like "Redirection" in the WordPress instance of the affected domain.
Comments
5 comments
Hi Plesk,
When using the preview (assuming it's a newly deployed website, therefore no "Redirection" plugins will/should be present), what is supposed to be done is to change siteurl & home in "wp_options" in phpMyAdmin:
to Plesk's preview URL:
Also, when the site is migrated, check wp-config.php, as sometimes they contain:
Do open the preview URL in incognito mode/other browser, as sometimes the cache will still redirect to main URL
Result:
Hope it helps!
@Mario Proposed workaround will change all links to the Plesk preview URL.
@Robert,
That is correct, otherwise the website will not work properly (i.e. CSS will not load). What other solution would you suggest?
Thanks
@Mario
At the moment there is no viable solution. However, we have a feature request so you may vote for the feature, add your own vision and participate in the discussion by referring to the link:
https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/33777442-wordpress-toolkit-url-switch-main-url-previ
It would be great to be able to log into your WordPress Admin before your DNS propagates so you can test it and update plugs, etc. I dont see any way to make this happen. Im on Amazon AWS hosting
Please sign in to leave a comment.