WordPress 404 ERROR When Trying to Access Cpanel

If you ever get a 404 (Page not found) error message when trying to login to your website’s Cpanel, here is what you can do/ask your hosting provider to do for you (NOTE: This is just a copy and paste of the email sent to me by my host’s support staff detailing all the steps she took to fix the issue):

1. I have tweaked the apache configuration to use minimum resources since apache was taking up memory earlier:

Timeout 80
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
StartServers 3
MaxSpareServers 5
MaxClients 100
MaxRequestsPerChild 400

2. Also we have enabled Cpanel proxy on the server. Now the Cpanel login URL is loading fine.

3. I have also corrected the Cpanel redirection to hostname from WHM >> Main >> Server Configuration >> Tweak Settings>> Redirection >>When visiting /Cpanel or /WHM or /webmail WITHOUT SSL, you can choose the "redirect to" option.

(NOTE: Cpanel proxy is a script which enables us to access Cpanel and WHM using /Cpanel, /WHM and /webmail instead of using the port number. I have installed it on the server.)

Thought this might help you. If you face the 404 error you can use this data to create your support ticket. Please keep in mind that I am on a VPS; if you are on a shared hosting account, your host might refuse to tweak some of the server settings mentioned above (I dunno for sure, just making a guess). ;)

Note that this error message would occur only if your blog is installed at the website’s root folder (that is, under "public_html"), rather than a subfolder of your website, as someone mentioned here (see the last message in that thread). Also, this error happens only when you have "Pretty permalinks" enabled in WordPress, and even then, it may not happen on all blogs. I have around 3 blogs, all installed at the respective sites’ root folders with pretty permalinks enabled, but the error occurs with only one of the blogs!

1 Comment

  1. Mark Thurston

    Since I am not a fan of ‘Pretty Permalinks’, guess I am safe. (much rather code any links that look ‘ugly’ myself)

    The problems I always seem to get is when recoding a template, (such as home.php). Then go to the front side only to see ‘…unexpected ‘T_ENDIF” at line 77…’ Lol. I mean, no matter how I count the lines, there is never an ‘EndIf’ there, let alone and ‘unexpected’ one.

    (& none of that includes the ‘EndWhere’ and ‘EndElse’s’. Lol). Anyway, I usually find it one line 22 or 56. ;)