CWShop Online

23 Oct 2026

How to install a PHP web app on cPanel shared hosting (step by step)

Upload, extract, check hidden files, set permissions, create a database if needed, run setup and turn on HTTPS, plus fixes for the most common errors.

How to install a PHP web app on cPanel shared hosting (step by step)

Many small-business web applications are written in PHP because PHP runs on almost every shared hosting plan. If you have bought or downloaded a PHP application and have a cPanel hosting account, you can usually install it yourself in under an hour. This guide covers the general steps that apply to most PHP apps. Always read the app's own README as well, because individual apps have their own requirements.

Before you start

Check three things first.

  • PHP version. The app will list a minimum, for example PHP 7.4 or higher. In cPanel, open MultiPHP Manager or Select PHP Version to see and change the version for your domain.
  • PHP extensions. Some apps need extensions such as pdo_sqlite, mbstring, curl or gd. They are usually enabled in the same PHP settings screen.
  • Database. Some apps need a MySQL database; others store data in files or in SQLite and need no database server. The app's requirements will say which.

Also decide where the app will live: at the main address of your domain (for example example.com), in a folder (example.com/shop) or on a subdomain (shop.example.com). Apps that are written to be path-agnostic work in any of these without editing configuration files.

Step 1: Get the files onto your hosting

  1. Log in to cPanel and open File Manager.
  2. Go to the folder for your site. For the main domain this is usually public_html. For a folder install, create the folder inside public_html. For a subdomain, cPanel shows the folder when you create the subdomain.
  3. Click Upload and upload the app's ZIP file.
  4. Back in File Manager, right-click the ZIP and choose Extract.
  5. Check where the files ended up. Many ZIPs contain a top-level folder; if so, move the files out of it so that the app's index.php sits directly in the folder you chose.
  6. Delete the ZIP once extracted.

If you prefer FTP, upload the extracted files with an FTP client instead. The result should be the same.

Step 2: Check hidden files

Most PHP apps include a file called .htaccess that controls URL routing and blocks access to private folders. File Manager hides files that start with a dot by default. Open Settings in File Manager and tick Show Hidden Files to confirm it was uploaded. Without it, pages may show "Not Found" errors, and private data folders may be reachable from the web.

Step 3: Set folder permissions

Apps that save data in files need a few folders the web server can write to, commonly named data, uploads or cache. On most cPanel servers the default permissions (755 for folders, 644 for files) already work, because PHP runs as your account user. If the app reports that a folder is not writable, right-click it, choose Change Permissions, and set it to 755. Avoid 777 unless your host specifically tells you to; it lets any process on the server write there.

Step 4: Create a database if needed

If the app needs MySQL:

  1. Open MySQL Database Wizard in cPanel.
  2. Create a database, then a user with a strong password.
  3. Give the user All Privileges on that database.
  4. Note the database name, user name and password; cPanel prefixes them with your account name.

If the app uses files or SQLite, skip this step.

Step 5: Run the setup

Open the app's address in your browser. Most apps start a first-run setup where you create the admin account, and sometimes enter database details or a licence key. Use a strong, unique admin password and store it in a password manager.

Step 6: Turn on HTTPS

Any page with a login or a payment form must use HTTPS. In cPanel, open SSL/TLS Status and run AutoSSL for your domain if a certificate is not already active. Then load the app with https:// and check that the browser shows a padlock.

Step 7: Check it properly

  • Sign out and sign in again to confirm the admin account works.
  • Click through every main page and check for errors.
  • Try to open a private folder directly, for example example.com/data/. You should see "Forbidden" or "Not Found", never a list of files.
  • Upload an image if the app supports it, to confirm the uploads folder is writable.

Common problems

  • Blank white page or "500 Internal Server Error". Usually a PHP version that is too old or a missing extension. Check the error log in cPanel (Errors or Metrics → Errors).
  • Home page works but other pages say "Not Found". The .htaccess file is missing or URL rewriting is disabled.
  • "Folder not writable". Fix the permissions on the folder named in the message.
  • Old version still showing after an update. Your host may cache PHP files. Wait a minute, or clear the cache if the app provides a way to do so.

After installation

Set up a backup routine straight away. Your hosting account now holds business data, and nobody else is backing it up for you unless your plan says so. Our article A simple backup routine for self-hosted business software explains a practical approach. If you bought from us, Getting started after your purchase covers finding your download and licence key, and our Help & FAQ answers common installation questions.

More from the blog