I inherited a Wordpress project.
I added a CSS file to theme (e.g. extra.css
).
But if I try to load it in the browser like so:
http://example.com/wp-content/themes/MyTheme/extra.css
I get a 'page not found' error. The file IS on the server in that directory.
If I create a new folder in the theme folder and try the URL, like so:
http://example.com/wp-content/themes/MyTheme/test/test.txt
The text file loads fine. I can't understand why ONLY CSS files won't load from the filesystem. I checked the .htaccess file - and the settings are the WP default.
So how can I get WP to recognize new CSS files in this instance? Or what might be the cause of this issue?
UPDATE: Two factors may be influencing this: (1) this is a virtual server managed by cPanel (ugh), and (2) the Wordpress theme is Avada by Theme Fusion, which seems to add a lot of strange bloat to the site.
.htaccess contents:
# BEGIN custom php.ini PHP54
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/example/public_html
</IfModule>
# END custom php.ini
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress