Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED cPanel preview url: how log into wordpress admin?

Discussion in 'General Discussion' started by USA_Webmaster, Nov 28, 2017.

  1. USA_Webmaster

    USA_Webmaster Active Member

    Joined:
    Dec 10, 2015
    Messages:
    38
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    How do I access the WP Admin part of my website using the cPanel preview temporary URL?

    http://192.167.123.456/~username/

    I went into phpMyAdmin, and edited two tables "XYZ_options" to match my above preview url.
    1. siteurl
    2. home
    Now, when I visit the preview URL, everything looks great but I'm not able to visit admin dashboard / backend. Instead I get redirected to another website being hosted on shared server.

    http://192.167.123.456/~username/wp-admin = broken
    http://192.167.123.456/~username/primarydomain.com/wp-admin = broken

    ---
    1. Does this work for primary domain?
    2. Will this work for addon domains?
    3. Why doesn't this work at all?

    ---

    SOLVED

    You must edit wp-config.php with new code
    Code:
    define('WP_HOME','http://192.167.123.456/~username/');
    define('WP_SITEURL','http://192.167.123.456/~username/');

    I didn't have to update .htaccess, but you could try if the above snippet doesn't work.
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /~username/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /~username/index.php [L]
    </IfModule>
    # END WordPress
     
    #1 USA_Webmaster, Nov 28, 2017
    Last edited: Nov 28, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I'm glad to see you were able to solve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    itopgun likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice