Back to Blog
PHP Scripts• 5 min read•August 5, 2026•1240 views

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.

CeeProlific
CeeProlific
Lead Fullstack Dev & Creator
Deploy PicHost PHP Script on Hostinger

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.


1. Server Prerequisites & Architecture

Before beginning the installation, ensure your hosting environment meets the following specifications:

  • Domain or Subdomain: A configured domain such as img.yourdomain.com with DNS pointing to your server.
  • PHP Version: PHP 8.1, 8.2, or 8.3 installed with extensions curl, mbstring, gd, fileinfo, and pdo_mysql.
  • Database Engine: MySQL 5.7+, MariaDB 10.3+, or an external cloud database like Supabase PostgreSQL.
  • Source Package: The full, verified pichost-source.zip archive downloaded from your CeeProlific customer dashboard.

2. Uploading Files & Setting File Permissions

Follow these simple steps to position your script files on your web hosting server:

  1. 1Log into your Hostinger hPanel or cPanel File Manager.
  2. 2Navigate to your website target directory, typically public_html or your subdomain folder.
  3. 3Upload the pichost-source.zip file and extract it directly into the directory root.
  4. 4Ensure critical folders have read and write permissions for the web server user.
bash
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.


3. Database Credentials & Environment Configuration

Copy the example configuration file and edit your operational credentials:

env
APP_NAME="PicHost"
APP_ENV=production
APP_URL=https://img.yourdomain.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pichost_db
DB_USERNAME=your_db_user
DB_PASSWORD=your_secure_password

MAX_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.


4. Database Migration & Cloudflare CDN Optimization

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:

  • Enable Cloudflare SSL in Full (Strict) mode.
  • Turn on Cloudflare Polish or auto-minification for instant WebP compression.
  • Create a Page Rule for /uploads/* with Cache Level: Cache Everything and an Edge Cache TTL of 1 month.

💡 Pro Tip: Enabling Cloudflare CDN drastically reduces your Hostinger server CPU load by serving 90% of repeated image requests directly from edge cache locations.


5. Post-Installation Testing & Troubleshooting

Upload a test JPEG and WebP file to confirm end-to-end functionality:

  • Check that the generated short URL, BBCode, and Markdown direct links copy successfully.
  • Verify thumbnail generation works under uploads/thumbs/.
  • Check that max upload limits in php.ini match your application settings (upload_max_filesize = 32M and post_max_size = 32M).

Your standalone image hosting platform is now ready for production use! For custom integrations or dedicated setups, reach out via our support portal.

Tags:#PHP#Hostinger#PicHost#Web Dev#cPanel
CeeProlific
Written By

CeeProlific

Fullstack developer, creator of CeeProlific Store, and author of verified production scripts and developer tools.

Comments (0)

Live Sync
No comments yet. Be the first to share your thoughts!

Related Articles

Security & Cyber Alert

Security Alert & Public Notice: Hacker Identified — Anurag Dubey (anonmoys21@gmail.com / +91 9702974993)

Official cybersecurity notice: Unauthorized attack attempts and fraud activity tracked to Anurag Dubey using Reliance Jio IP 2409:4090:f051:2204:25c4:7f04:b036:ff32. Digital footprint, phone numbers, and forensic evidence revealed.

AI & Automation

Top 5 AI Coding Tools for Developers in 2026

Discover the best AI assistants, code generators, and pair programmers that are boosting developer productivity by 3x this year.