Not every PHP project needs Docker, Kubernetes, or a VPS. A school site, portfolio, small CRM, or brochure app can live happily on shared hosting if you deploy cleanly. This walkthrough shows a practical path on HostPawa PHP hosting / web hosting, including free SSL via our Free SSL guidance.
What you need before you start
- A HostPawa hosting account and domain (or a subdomain for testing)
- Your site files (PHP templates, assets, and any
vendor/folder if you use Composer) - Database credentials if the app stores data
- SFTP client (FileZilla, WinSCP, Cyberduck) or the panel file manager
Step 1 — Create or confirm the hosting account
Order or open your web hosting plan and note:
- Control panel login
- SFTP/SSH host, username, and port (if SSH is enabled on your plan)
- Default document root (often
public_htmlfor the primary domain)
If you are deploying an addon domain or subdomain, create it in the panel first so the correct folder exists.
Step 2 — Pick the PHP version
In the panel, set PHP to a supported modern version that matches your code. Simple sites often run fine on current PHP 8.x. Avoid ancient versions “for compatibility” unless a legacy library truly forces it—and plan to upgrade that library.
Step 3 — Upload files
- Connect with SFTP using the panel credentials.
- Navigate to the site’s document root.
- Upload your PHP files and assets.
- If the app uses a
public/front controller pattern, either upload sopublic/contents land in the web root, or adjust the document root topublic/when the panel allows it.
Do not upload .env with debug secrets into a public folder. Keep configuration outside the web root when possible, or protect it with permissions and server rules.
Step 4 — Create the database
- Open MySQL databases in the panel.
- Create a database and a user with a strong password.
- Grant that user access only to that database.
- Import your
.sqldump via phpMyAdmin or the CLI if available. - Update the app config with host (often
localhost), database name, user, and password.
Step 5 — Set permissions carefully
Directories that must accept uploads need write access; everything else should be as restrictive as the panel allows. Typical pattern:
- Code files readable by the web server, not world-writable
- Storage/upload folders writable
- No
777unless you are temporarily debugging—and revert immediately
Step 6 — Enable HTTPS
Issue a certificate for the domain (Let’s Encrypt-style automation on modern hosts). Then force HTTPS so forms and cookies stay secure. HostPawa’s Free SSL page explains the SSL story for customers. After SSL is active, update any hardcoded http:// links in templates or the database.
Step 7 — Point DNS
- At your domain DNS host, set A/AAAA (or nameservers) as instructed in the HostPawa welcome email/panel.
- Wait for propagation; use a staging subdomain first if the apex domain is already live elsewhere.
- Lower TTL ahead of cutover when you can.
Step 8 — Smoke-test like a user
- Homepage loads over HTTPS
- Forms submit and show success/error states
- Login works if applicable
- File upload works (and lands in the right folder)
- 404 page is acceptable
- Email notifications send (or fail loudly in logs so you can fix SMTP)
Check the panel error log after the first hour of traffic. Most deploy bugs show up immediately: missing extensions, wrong DB password, or incorrect paths.
Composer apps on shared hosting
If you use Composer:
- Run
composer install --no-devlocally or in CI - Upload the generated
vendor/directory - Ensure the autoloader path in your front controller is correct
Some plans allow SSH Composer on the server; if not, build elsewhere and upload artefacts.
Common mistakes
- Uploading the entire project above
public/but leaving the web root pointing at the project root (exposes.envand source) - Leaving
display_errorson in production - Forgetting to update config after importing a database from localhost
- Assuming mail() will deliver reliably without SPF/DKIM alignment
- Skipping backups before overwriting an existing site
When shared hosting is no longer enough
Move up when you need persistent queue workers, custom server packages, or more CPU/RAM isolation. Until then, shared PHP hosting remains the fastest way to ship a simple site. Pair it with solid web hosting features and free SSL, and you have a production-ready baseline.
Bottom line
Deploying a simple PHP site is a checklist, not a mystery: correct PHP version, clean upload into the right document root, database wired, HTTPS on, DNS pointed, smoke tests done. Follow those steps on HostPawa and you will spend your energy on the product—not on fighting the server.