CSS not showing up in my website Only HTML Displaying

I am very new to wordpress. I installed it on my linux server lately and uploaded a them on it. Everything looks good on my browser however if I try to access the website outside my network I am only getting the Text and not the CSS. I have read all different forum for the fix bt my problem still there. Here is my .htaccess

# 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

I have changed the permission to 755 and 777 restarted apache but still same issue.

Topic css wp-admin Wordpress

Category Web


You need to enter the full hostname and .local suffix into the WordPress Address and Site Address fields.

eg. http://raspberrypi.local


Go to "General Settings" and set "wordpress address" and "site address" from your localhost address to your domain address...


Have you tried with register script. Sample code

 wp_register_script('jquery', get_template_directory_uri() . '/assets/all.js', false, null);
wp_enqueue_script('jquery');
wp_register_style('all', get_template_directory_uri() . '/assets/all.css', false, null);
wp_enqueue_style('all');

If you have installed it in some folder, then your htaccess file should look like

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /yourfoldername/     -----> This line
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /barter3/index.php [L]
</IfModule>

# END WordPress

If you are getting the text, then .htaccess might not be the problem.

Can u open the url in chrome browser, right click, inspect element, network -> Now refresh the page again You will see styles tab in network Click on it, it will show the url you are hitting for the css. Confirm your url is correct.


Check you are addressing the CSS file correctly. How is it being called?

The url should be along the lines of ht|tp://yoursite.com/wordpress/wp-content/themes/yourtheme/style.css you'll find somewhere that it's loading as ht|tp://localhost/and so it will load correctly on your machine but not on anyone else's.

Have a look in Developer Tools for the URL of style.css

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.