0

My Wordpress website admin page http://example.com/wp-admin keeps redirecting me to the subdomain I created when adding the site to my CPanel. I have to use wp-login.php when accessing the Wordpress admin dashboard.

I'm using BlueHost as my hosting provider. They can't seem to help me figure this out. I have to use wp-login.php when accessing the Wordpress admin dashboard.

Any help is appreciated.

  • A
  • what do you mean to the subdomain? http://subdomain.example.com/wp-admin ? – David Lee Aug 19 '17 at 3:28
  • @DavidLee I mean it redirects to example.primarydomain.com/wp-admin A subdomain is created when adding a domain to CPanel. – Alison Mae Aug 19 '17 at 3:36
  • can you edit your question and elaborate more please, with steps of what are you doing, because you say "keeps redirecting me to the subdomain I created" but also say "A subdomain is created when adding a domain" also its a single WP install or MultiSite – David Lee Aug 19 '17 at 3:41
  • Sure. Ok, so when you create a hosting account, you are supposed to add a domain name as the "primary" domain name for the hosting account. Any domain names you add moving forward are assigned to the CPanel account as subdomains. Does that explain it? Thanks. – Alison Mae Aug 19 '17 at 3:44
  • So, the Wordpress site I'm referring to in my question is a subdomain assigned to the account. And when I try to access the wp-admin page for that site, it redirects me to example.primarydomain.com/wp-admin – Alison Mae Aug 19 '17 at 3:45
0

Add the indicated line to your .htaccess and all should be fixed

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
**RewriteCond %{http_host} ^(www\.)?YourDomain\.com$ [nc]**
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.