cancel
Showing results for 
Search instead for 
Did you mean: 

After installing Magento 2.4.2 on XAMPP in Ubuntu js and CSS not load in the frontend and backend.

After installing Magento 2.4.2 on XAMPP in Ubuntu js and CSS not load in the frontend and backend.

hello,

I have installed Magento version 2.4.2 in XAMPP - Ubuntu,

installation was successful with elastic search,

but when I run the front and back URL, it's not load properly,

when I see in console its look like the CSS and JS are not load,

 

I see the path of css and js, in the path pub folder is missing,

I have attached the below screen shot.

Screenshot from 2021-05-05 20-16-39.pngScreenshot from 2021-05-05 16-32-02.png

please help me with this.

thank you.

2 REPLIES 2

Re: After installing Magento 2.4.2 on XAMPP in Ubuntu js and CSS not load in the frontend and backen

Hi @R K Solanki ,

 

First Try disabling version number from the files using below ways

You can disable option in your admin
Stores>Configuration>Advanced>Developer>Sign Static Files (dev_static_sign)

Or simply insert this row in your core_config_data table
insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

Also check if we have .htacess file in pub/static folder. if not , try to recreate that file and run

content deploy command.

 

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: After installing Magento 2.4.2 on XAMPP in Ubuntu js and CSS not load in the frontend and backen

Hello @R K Solanki 

 

Please follow step 4 at https://meetanshi.com/blog/install-magento-2-4-2-on-localhost-using-xampp/ to solve your issue.

 

I hope it helps.

Problem solved? Click Kudos and "Accept as Solution"