This portfolio runs on HosterPK shared hosting — LiteSpeed, cPanel, no framework, plain PHP. Deploying it taught me more about how shared hosting actually works than any tutorial, mostly because the first deploy broke in instructive ways.
The permission problem
After the first upload the site loaded, but pages were unstyled and an .htaccess permission error appeared. The cause was file modes: the upload had set public_html to 0644, directories to 0770 and PHP files to 0660/0664. LiteSpeed would not serve the site correctly with those modes.
The fix, verified on the live server:
public_htmland all directories:0755.htaccessand static files:0644- PHP files:
0644
Once the modes were corrected in cPanel File Manager, the .htaccess error disappeared and the CSS loaded. The lesson generalizes: on shared hosting, a broken-looking site is a permissions problem more often than a code problem.
What I check on every deploy now
- Confirm the actual document root for the domain in cPanel (do not assume
public_html). - Verify directory and file permissions after upload — extraction can reset them.
- Load the homepage, a nested page and a missing URL, checking for the styled 404 page.
- Confirm HTTPS and the canonical host redirect behave.
None of this is glamorous. All of it is the difference between "deployed" and "actually working". Related reading: clean URLs with mod_rewrite on shared hosting.