PHP still runs a huge share of the web
WordPress, Laravel, Drupal, Joomla, Magento, OpenCart and countless custom business apps are PHP. It is fast on modern versions, cheap to host, and every developer can find their way around it. This guide covers both a plain PHP site and a framework app such as Laravel, using Cloud Ninza as the worked example.
Step 1 — Choose a PHP plan
PHP plans differ mainly in how many websites and databases you can run and how much storage you get. On Cloud Ninza: Starter (₹1,188 a year) for 1 website with 3 GB, Growth (₹2,388) for 2 websites, Business (₹3,588) for 3, and Pro (₹4,188) for 5 websites with 25 GB. Prices are before GST; 2 years save 5%, 3 years save 10%, 4 years save 15% and 5 years save 20%.
Open Create an app, choose PHP, the plan, the term and your domain, and pay by UPI, card or net banking. Your account and site are set up automatically after payment.
Step 2 — Get your files onto the server
For a plain PHP site, upload a zip to public_html with the File manager and extract it — the file manager handles zip, tar.gz and more, has a code editor, and lets you set permissions. Developers can switch on SSH with a key and use rsync or Git from the terminal.
For anything you maintain, connect Git. Pushes to your branch deploy into the site folder as a new release; composer install runs as the build step; the site is checked and, if it fails, the previous release stays live. Shared paths such as storage/ and .env carry over between releases.
Step 3 — PHP version and web root
Choose the PHP version per site on the Domains page — every version from 5.6 to 8.5 is installed, so a legacy app and a new Laravel project can live side by side. Use the newest version your code supports; PHP 8.3 and later are much faster than 7.x.
Frameworks serve from a public/ folder so that code, configuration and .env are never reachable from the web. On App settings choose the Laravel, Symfony or CodeIgniter preset and the web root is set to public/ for you.
Step 4 — Database and Composer
Create a MySQL/MariaDB database on the Databases page (PostgreSQL is available too). Open phpMyAdmin with one click — it signs you in to that database only — and import your SQL dump. Put the database name, user and password in your .env or config file; the host is localhost.
Run composer install from the dashboard, or from the terminal where composer and every php8.x version are available. For Laravel, generate an APP_KEY, then run migrations: php8.3 artisan migrate --force (match the version to your site).
Step 5 — Scheduled tasks and queues
Add cron jobs on the Cron jobs page. Laravel needs one entry: php artisan schedule:run every minute. Queues: the PHP plans do not run an always-on worker, so process the queue from the scheduler with queue:work --stop-when-empty every minute, which handles normal workloads well. If you need permanent workers, run the app on a Node.js-style app plan or a cloud server.
Step 6 — Domain, SSL and email
Point A records for @ and www to the server IP on the Domains page. Free SSL is issued automatically and renewed, and HTTPS is switched on. For contact forms and notifications, add the SPF and DKIM records shown under Domains → Email from this website, so Gmail and Outlook accept your site's mail. Every plan also includes free email accounts on your domain.
What you get with Cloud Ninza PHP hosting
Everything a PHP site or framework app needs:
- PHP 5.6 to 8.5, chosen per site
- Presets for Laravel, Symfony, CodeIgniter and CMS installs
- Composer, WP-CLI and every php8.x version in the terminal
- MySQL/MariaDB and PostgreSQL; phpMyAdmin opens already signed in
- Git deployments with shared storage and .env, health check and rollback
- Cron jobs, logs, file manager with editor, key-only SSH
- Free SSL issued automatically, HTTPS on
- Free email accounts, two-step sign-in and an activity log
- Servers in India, isolated accounts, daily server backups restored on request
Quick fixes for common PHP errors
500 error after upload: check Logs → error log; a missing extension or wrong PHP version is common. Laravel shows a directory listing or 403: the web root is not public/. “Permission denied” writing to storage: make storage and bootstrap/cache writable. Blank page with no error: turn on display_errors temporarily in a development copy, never on the live site.
Securing a PHP site after launch
Most PHP compromises come through old code, not the server. Keep frameworks, CMS cores and libraries updated with composer update in a test copy first. Never leave installer scripts, phpinfo files, SQL dumps or zip backups in public_html — attackers scan for exactly those, and on Cloud Ninza common backup and dump file names are blocked from the web on every site. Use the web root properly: with Laravel, Symfony or CodeIgniter only public/ is reachable, so .env, vendor/ and storage/ never are.
Use strong, unique database passwords, prepared statements for every query, and HTTPS everywhere — the free certificate makes that automatic. Turn on two-step verification for your hosting account, so a stolen password alone cannot change your site.
- Update dependencies regularly, testing first
- Nothing but public files in the web root
- Prepared statements for every query
- HTTPS and two-step sign-in on
Moving an existing PHP site from cPanel
Moving from a cPanel host follows four steps. Download your files (a zip of public_html) and export the database from phpMyAdmin as SQL. On the new plan, upload and extract the files, create a database and import the SQL through phpMyAdmin, then update the database name, user and password in your config file. Test the site on the new server before switching DNS, then change your domain's A records and let SSL issue. Keep the old account until you have checked forms, logins and payments on the new one.
Choosing the right PHP version
Newer PHP is faster and safer, but old code can break on it. Check your framework's supported versions first: Laravel 11 and 12 need PHP 8.2 or newer, recent WordPress runs well on 8.3 and later, and a legacy app from the PHP 5 era may need 5.6 or 7.4 until it is updated. Because the version is chosen per site, you can run the old app on its version while you rebuild it on a new one beside it.
Speed tips for PHP sites
Most PHP speed comes from a few habits. Run the newest PHP version your code supports — each major release brings real speed-ups. Cache what does not change: Laravel's config, route and view caches (php artisan optimize) and full-page caching for CMS pages. Index the database columns you search and join on, and check slow queries before blaming the server. Compress and resize images before upload, and put a CDN such as Cloudflare in front for visitors outside India, with SSL set to Full (strict).
Key takeaways
The short version, for anyone skimming:
- Upload to public_html or deploy from Git; Composer runs as the build step.
- Pick the PHP version per site (5.6–8.5) and use public/ as web root for frameworks.
- MySQL/MariaDB with one-click phpMyAdmin; cron for Laravel's scheduler.
- No always-on queue worker on PHP plans — process queues from cron.
- Cloud Ninza PHP hosting starts at ₹1,188 a year before GST.
PHP Hosting
PHP hosting on cloud servers in India from ₹99 a month, billed yearly. PHP version of your choice, 7.4 to 8.5 · MariaDB, MySQL or PostgreSQL included · External databases — MongoDB Atlas and others by connection string.
Hosting from ₹99 a month on servers in India
WordPress, PHP, Node.js, Python and Java plans with free SSL and your choice of version. Create your account, pick a plan and pay by UPI, card or netbanking; your hosting is created automatically and you get your login by email, usually within minutes.