Magento Fresh install 2 No Css Js After Install

cd /var/www/html/magento2/

sudo chmod 777 -R /var/www/html/magento2/

php bin/magento cache:flush

php bin/magento indexer:reindex

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

php bin/magento cache:flush

For Remove version from css url:

We can disable it in Admin:
Stores > Configuration > Advanced > Developer > Sign Static Files

Or we can change directly the value in core_config_data:
insert into core_config_data (config_id, scope, scope_id, path, value) values (null, ‘default’, 0, ‘dev/static/sign’, 0);

Enable Apache mod rewrite:

sudo a2enmod rewrite

sudo nano /etc/apache2/sites-available/000-default.conf

Add the following code at the botom of file:

AllowOverride All

sudo systemctl restart apache2

Categories: Magento2

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *