Xgenious/ docs

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

SymptomWhat You See
Store looks completely unstyledPages load as raw HTML with no layout
Images are brokenTheme images show broken-image icons
JavaScript not workingSliders, dropdowns, add-to-cart buttons do not respond
Admin panel looks brokenTheme preview images are missing
Works locally, broken on serverFine in development, broken after upload

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 SeeMeaning
No such file or directorySymlink does not exist — create it
A local path such as /Users/yourname/...Symlink copied from dev machine — repoint it
A path on a different serverLeftover from a previous migration — repoint it

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

  1. Never delete public/themes — it holds theme asset symlinks for all themes.
  2. Verify with ls -lah themes before rm themes to confirm it is a symlink.
  3. Never use chmod 777 as a permission fix.
  4. Always run artisan as the app owner.
  5. After any artisan command, run optimize:clear and hard-refresh the browser.
Still stuck?
Our support team is ready to help you get set up.
Get support