Step 1: Install Required Environment Software (LNMP / LAMP)
Before deploying your PHP website, make sure your server environment has the essential software installed from the App Store:
-
Web Server: Nginx or Apache
-
Database: MySQL (or MariaDB)
-
PHP: Install the version compatible with your project (consult your developer if you are unsure)
Step 2: Install Required PHP Extensions
If your application depends on specific modules (such as fileinfo, redis, gd, or curl), install them under App Store > PHP > Settings > Extensions. (Link: Check our guide on how to install PHP extensions)
Step 3: Create the Website Directory
Navigate to the Files section and open the /www/wwwroot/ path. Create a dedicated folder for your project—naming it after your domain (e.g., /www/wwwroot/example.com) keeps your server organized.
Step 4: Upload Your Source Code
Upload your PHP application files or archive directly into the newly created folder, then extract the files if uploaded as a .zip.
Step 5: Set Up the Database
Go to Databases and create a new database along with its user credentials. Import your SQL file if migrating an existing site. (Link: Check our guide on how to create a database in aaPanel)
Step 6: Add the Website in aaPanel
With your files uploaded and database ready:
-
Go to the Website section in the left sidebar.
-
Under the PHP project tab, click Add site.
-
Configure the following fields:
-
Domain: Enter your root domain and subdomain (e.g.,
example.com,[www.example.com](https://www.example.com)). -
Root directory: Select the folder created in Step 3 where your files are uploaded.
-
PHP Version: Choose the PHP version required by your application.
-
Create html file: Uncheck this option to prevent overwriting your existing files.
-
-
Click Confirm to finalize the setup.


Step 7: Secure with SSL
Your website is now live! Secure it by installing a free Let's Encrypt certificate. (Link: Follow our guide on how to install an SSL certificate in aaPanel)
