cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.9 admin css and js not loading after changing URL

Magento 2.2.9 admin css and js not loading after changing URL

I just changed the admin URL, and now my backend stopped working. I already did some research on Magento forums, but couldn't find the solution which works for me.

 

Screenshot 2019-08-28 at 16.56.14.png

10 REPLIES 10

Re: Magento 2.2.9 admin css and js not loading after changing URL

Hi @muhamamd a_anju,

It looks like deployment issue.

Run the following command in the sequence.

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* pub/static/*

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento indexer:reindex
chmod -R 0777 var/ pub/ generated/

Also make sure that you have .htaccess file inside pub/static folder.

I hope it will help you!

Re: Magento 2.2.9 admin css and js not loading after changing URL

Thanks but it still the same, is there anyway to change the custom admin "path" via ssh?

Re: Magento 2.2.9 admin css and js not loading after changing URL

Hello Vimal,

 

No change.

 

And .htaccess file is available under pub/static folder.

 

Thansk

Re: Magento 2.2.9 admin css and js not loading after changing URL

Hi @rajjagdev,

Yes, you can change admin path using ssh as well.

php bin/magento setup:config:set --backend-frontname="admin_path"

Re: Magento 2.2.9 admin css and js not loading after changing URL

Also make sure that permission on the server is correct.

You can try following command as well to reset

sudo find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

sudo chmod -R 0777 var/ pub/ generated/

Re: Magento 2.2.9 admin css and js not loading after changing URL

After change the permission.

Run the following commands in the sequence once.

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento indexer:reindex
chmod -R 0777 var/ pub/ generated/

Re: Magento 2.2.9 admin css and js not loading after changing URL

Screenshot 2019-08-28 at 18.04.10.pngThis needs to be fixed. i want to remove this proadmin and put it back to where it was before.

Re: Magento 2.2.9 admin css and js not loading after changing URL

Try this:

php bin/magento setup:config:set --backend-frontname=NULL

OR delete the entry manually from the core_config_data table.

Re: Magento 2.2.9 admin css and js not loading after changing URL

Hi @muhamamd a_anju @rajjagdev 

Issue reolved? or still facing the issue?