I'm in the process of trying to figure out some issues with Magento 2.4.2 installation on a Cpanel server. I installed 2.4.1 to see if that would work and it still does. I moved it into a subdirectory to make sure I could do that and I got the usual error that the CSS/JS broke.
I logged into the admin and set the base url from:
http://www.fieldhockey.co/
too:
http://www.fieldhockey.co/store/
And saved the form, I got redirected to the new location but its obviously broken. I go to the root folder and drag all the Magento code and directories into my new sub-directory and the CSS/JS is still broken (not loading).
Now I read in an article that you should delete or rename the /pub/static/ directory so the Cache is regenerated using the new path. I tried this and the directory was created but it did not fix the issue.
I wasn't sure how to solve this?