Skip to content

Host a PHP website ​

Deploy a PHP site through the APNCloud Hosting Panel. Keep application secrets and private files outside the public directory.

Before you begin ​

Prepare a site backup, the application’s supported PHP version, required extensions, database export and production configuration. Confirm shell access if Composer must run on the server.

Steps ​

  1. Add the domain and confirm its document root in the panel. Use the actual path shown for your account.
  2. Select a supported PHP version in PHP Settings and check required extensions.
  3. Upload the application to the correct directory. If it uses a separate public folder, serve only that folder.
  4. Create a database and a dedicated database user, import the data, and update the application’s private configuration.
  5. If the project uses Composer, install the locked production dependencies in the application directory. Use the same supported PHP version as the website.
  6. Enable HTTPS, test the site, and remove any installer, debug page or database export from the public directory.

Composer example ​

bash
composer install --no-dev --prefer-dist --optimize-autoloader

If something goes wrong ​

A 500 error needs the application or PHP error log, not world-writable permissions. Check PHP compatibility, extensions, database credentials and ownership. Disable displayed errors in production; keep private error logging enabled.

Last reviewed ​

2026-10-28