CSS and JS not loading after installation of Magento default template
If you face problems after installing the Magento template and CSS and JS got stuck, then you have come to the right place. Here we will learn on how to fix the problems related to CSS and JS files that are not loading from a correspnding folder.
If something goes wrong like what has happened in the current situation, check the browser console, If you note that there are attempts to access the files that are not in the pub/static folder among the other errors that has happened then you will be able to find the solution to the problem soon.
Why this issue Occur
If you redeployed it after deleting the pub/static directory you would have deleted the .htaccess file in pub/static directory in your best website hosting services. That causes the URL Rewrite issue.
Put the .htaccess with url rewrite option in the pub/static directory , will resolve the problem
How to fix this issue.
Kindly Login to the cPanel
Once you have logged in to the cPanel we need to go the directory
Then we need to remove all files instead of .htacces in your Shared hosting web space
After removing all the files in the web space go to file
After following the 4th step you need change Symlink to Copy in the file content.
Replace ('Symlink' --> 'Copy')
Once you have followed all the above steps proerly you can save the file.