skip to Main Content

Just installed Magento 2 on a shared server, everything seemed successful, no errors, but the shop looks like this (css files not found, they return 403 Forbidden, but the files are actually missing):

enter image description here

It seems like the static content/css is not generated.

pub/static:
enter image description here

The only file in pub/static/frontend/Magento/luma/locale is requirejs-config.js, but there were supposed to also be other files, such as those CSS files:
enter image description here

I tried reinstalling it, changing folder permissions, different PHP version, nothing worked. It’s strange that some folders are generated (also the requirejs file), but not the CSS.

How can I make sure the CSS is generated (without shell access) ?

Why would Magento clearly say installation was successful if it couldn’t generate the static files? Can I somehow manually copy those static files?

Specs:

  • PHP Version 7.1
  • Magento CE 2.3.0
  • Installed on a shared server, only have cPanel access, no shell

2

Answers


  1. Try the following command and cache:flush.
    php bin/magento setup:static-content:deploy -f

    Login or Signup to reply.
  2. it’s a very strange issue appears only in 2.3 version.
    You should insert this SQL code in your project database ( or in PHPMyAdmin ui):

    insert core_config_data (config_id, scope, scope_id, path, value) values (null, ‘default’, 0, ‘dev/static/sign’, 0);

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search