WordPress website preview page gets redirected to main URL

Follow

Comments

4 comments

  • Avatar
    Mario

    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:

    define('WP_HOME','https://www.example.com');
    define('WP_SITEURL','https://www.example.com');

    Do open the preview URL in incognito mode/other browser, as sometimes the cache will still redirect to main URL

    Result:

    Hope it helps!

  • Avatar
    Robert Asilbekov (Edited )

    @Mario Proposed workaround will change all links to the Plesk preview URL.

     

  • Avatar
    Mario

    @Robert, 

    That is correct, otherwise the website will not work properly (i.e. CSS will not load). What other solution would you suggest?

    Thanks

  • Avatar
    Robert Asilbekov

    @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

     

Please sign in to leave a comment.

Have more questions? Submit a request