0

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.

3
  • Can you include a copy of your enqueue function from your functions.php file?
    – Cedon
    Commented Jul 24, 2017 at 17:33
  • Are you using LAMP? WAMP? An actual ISP, like GoDaddy, that has linux or did you set up the linux server by yourself? The problems look a lot more like server problems and not WordPress. Also, when you respond here at StackExchange, use the "add a comment" link under the answer rather than using a new answer to respond.
    – BillyNair
    Commented Jul 24, 2017 at 17:48
  • I am using LAMP. I set up the linux server myself. It is on a raspberry pi 3. Jessie Lite. Sorry I am new to StackExchange
    – user124482
    Commented Jul 24, 2017 at 18:39

4 Answers 4

0

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

0

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.

0

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

eg. http://raspberrypi.local

-1

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

1
  • Please edit your answer, and add an explanation: why could that solve the problem?
    – fuxia
    Commented Oct 15, 2018 at 11:20

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