Theme Assets Recovery
For server administrators and platform owners. Use this guide after a deployment or server migration when theme assets (CSS, JS, images) are missing or broken.
Root cause: Nazmart serves theme CSS, JS, and images through a themes folder in the project root that must be a symlink pointing to core/public/themes. After a fresh deploy or migration the symlink is missing, points to a local dev path, or the assets were never published into it.
Symptoms
| Symptom | What You See |
|---|---|
| Store looks completely unstyled | Pages load as raw HTML with no layout |
| Images are broken | Theme images show broken-image icons |
| JavaScript not working | Sliders, dropdowns, add-to-cart buttons do not respond |
| Admin panel looks broken | Theme preview images are missing |
| Works locally, broken on server | Fine in development, broken after upload |
Diagnose the Symlink
From the project root (for CloudPanel typically /home/nazmart/htdocs/nazmart.com — replace with your actual path):
cd /home/nazmart/htdocs/nazmart.com
ls -lah themes
readlink -f themes
Expected output:
/home/nazmart/htdocs/nazmart.com/core/public/themes
| What You See | Meaning |
|---|---|
No such file or directory | Symlink does not exist — create it |
A local path such as /Users/yourname/... | Symlink copied from dev machine — repoint it |
| A path on a different server | Leftover from a previous migration — repoint it |
Fix the Symlink
First confirm themes is a symlink (an l prefix in the ls -lah listing), not a real folder. Only then run:
rm themes
ln -s core/public/themes themes
readlink -f themes
Publish Theme Assets
If the symlink is correct but core/public/themes is empty or missing themes, publish them:
cd /home/nazmart/htdocs/nazmart.com/core
sudo -u nazmart php artisan theme:publish --all --copy
sudo -u nazmart php artisan optimize:clear
The --copy flag handles themes stored as real directories. Always run artisan as the app owner (here nazmart) — never fix permission errors with chmod 777.
Verify published links:
find public/themes -maxdepth 1 -type l -ls
Re-run the publish command if any symlink target does not exist.
Permission and Manifest Fixes
Permission denied on storage/logs/laravel.log: the artisan command ran as the wrong system user. Check ownership with ls -lah storage/logs and always run sudo -u nazmart php artisan ... when files are owned by nazmart.
Invalid plugin manifest (missing min_platform_version): inspect the named Modules/<Name>/plugin.json, compare against valid modules with grep -R '"min_platform_version"' Modules/*/plugin.json, add the missing field using the same version format, then retry theme:publish --all --copy.
Ignore PHP Deprecated warnings — they are notices, not the cause. Focus on actual errors (permission denied, invalid manifest).
Verify and Hard Refresh
cd /home/nazmart/htdocs/nazmart.com
readlink -f themes
cd core
sudo -u nazmart php artisan optimize:clear
Then hard-refresh the browser (Cmd+Shift+R on macOS, Ctrl+Shift+R on Windows/Linux). The store should load with full styling and images.
Quick Copy-Paste Recovery
cd /home/nazmart/htdocs/nazmart.com
readlink -f themes
rm themes
ln -s core/public/themes themes
readlink -f themes
cd core
sudo -u nazmart php artisan theme:publish --all --copy
sudo -u nazmart php artisan optimize:clear
cd ..
readlink -f themes
Expected final output: /home/nazmart/htdocs/nazmart.com/core/public/themes.
Rules
- Never delete
public/themes— it holds theme asset symlinks for all themes. - Verify with
ls -lah themesbeforerm themesto confirm it is a symlink. - Never use
chmod 777as a permission fix. - Always run artisan as the app owner.
- After any artisan command, run
optimize:clearand hard-refresh the browser.

