Deploy PicHost PHP Script on Hostinger
Step-by-step guide to installing PicHost, configuring Supabase storage, setting up environment variables, and pointing your custom domain in under 10 minutes.

Step-by-step guide to installing PicHost, configuring Supabase storage, setting up environment variables, and pointing your custom domain in under 10 minutes.


Installing a modern, high-performance image hosting service does not have to be difficult. With PicHost, you can launch a private image hosting solution or a public media platform on shared hosting like Hostinger or cPanel in under ten minutes.
This complete deployment tutorial guides you through server prerequisites, uploading files, database migration, environment setup, and CDN caching.
Before beginning the installation, ensure your hosting environment meets the following specifications:
Follow these simple steps to position your script files on your web hosting server:
1. Log into your Hostinger hPanel or cPanel File Manager.
2. Navigate to your website target directory, typically `public_html` or your subdomain folder.
3. Upload the `pichost-source.zip` file and extract it directly into the directory root.
4. Ensure critical folders have read and write permissions for the web server user.
chmod -R 755 uploads/chmod -R 755 storage/chmod -R 755 bootstrap/cache/If your server runs Nginx or Apache with suPHP, standard 755 for folders and 644 for files ensures proper security while allowing image uploads.
Copy the example configuration file and edit your operational credentials:
APP_NAME="PicHost"APP_ENV=productionAPP_URL=https://img.yourdomain.comDB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=pichost_dbDB_USERNAME=your_db_userDB_PASSWORD=your_secure_passwordMAX_UPLOAD_SIZE=25M
ALLOWED_EXTENSIONS="jpg,jpeg,png,webp,gif,svg"
STORAGE_DRIVER=local
If you prefer external cloud storage, you can set `STORAGE_DRIVER=supabase` and supply your Supabase project URL and service role key.
Once your database is created in phpMyAdmin, import the included `database.sql` schema file or visit `https://img.yourdomain.com/install` to complete automated table generation.
To optimize bandwidth and delivery speeds worldwide, place Cloudflare in front of your domain:
💡 **Pro Tip:** Enabling Cloudflare CDN drastically reduces your Hostinger server CPU load by serving 90% of repeated image requests directly from edge cache locations.
Upload a test JPEG and WebP file to confirm end-to-end functionality:
Your standalone image hosting platform is now ready for production use! For custom integrations or dedicated setups, reach out via our support portal.

Discover the best AI assistants, code generators, and pair programmers that are boosting developer productivity by 3x this year.
An in-depth comparison of Canva Free vs Canva Pro. Learn how background remover, magic resize, and stock video library save hours of graphic design work.