How to fix WordPress Display Problem

I have installed WordPress hundreds of times. Besides the very occasional minor non-WordPress issue, the installs have always worked fine. Until yesterday …

New WordPress but CSS gone CRAZY

I had a domain name that forwarded to another but I decided I wanted to create a WordPress powered Site for the domain. I cancelled the forward on Godaddy Domain manager and set the DNS nameservers as the Godaddy recommended servers. I then installed WordPress at the required Godaddy shared hosting folder (this method has always worked fine in the past).

I noticed that when viewing the homepage or the dashboard of the new WordPress install (i.e. http://www.example.com and http://www.example.com/wp-admin) the styling was as if no CSS was evident (the layout, fonts, colours etc. didn’t look ‘right’). I changed the theme but that didn’t help, I reinstalled WordPress and that didn’t help, I changed the DNS nameservers and I spent hours on the Web trying to find a solution. Also the CSS/display problem wasn’t unique to a computer or Browser; the same problem was there with Microsoft Internet Explorer, Mozilla Firefox, Opera and Google Chrome and on multiple computers.

A Solution to a WordPress Problem

This is not the first time that this error has been experienced when installing WordPress and it is, as mentioned, not specific to specific computers or Internet Browsers (or Webhost i.e. not just Godaddy shared hosting). During my Web search for a solution I arrived at many forums where this problem is discussed with various potential solutions however none resolved the issue for me. I eventually discovered a solution after noticing a few forum responses recommending certain .htaccess hacks which may work. Although none of the solutions provided in the forums worked for my WordPress problem, I managed to find a solution through trying a few .htaccess hacks which, in desperation, I hoped may work.

WordPress .htaccess Problem Resolution

The solution for this WordPress display problem is as follows in the two steps below:

1. With a text editor create a file named .htaccess in the root of your WordPress install (if an .htaccess file already exists then ignore this step and continue with step 2).

2. Save the following in the .htaccess file:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

These .htaccess lines above basically send browsers and searchbots to index.php of your WordPress install. AskApache has a good explanation for those interested in further .htaccess information.

Good luck and please let me know if this resolves your WordPress CSS problem.