Installing CakePHP on Cloudways takes about twenty minutes and hinges on two things the platform does not do for you: you must launch a Custom PHP Application rather than a WordPress app, and you must change the Webroot field so it points at your project’s webroot folder. Everything else is Composer and a database.
cd applications/<app>/public_html and composer create-project --prefer-dist cakephp/app:~5.0 cakeapp. In the console go to Applications → your app → Application Settings and set Webroot to cakeapp/webroot. Copy the database credentials from Access Details into config/app_local.php, run bin/cake migrations migrate, then turn Varnish off or add exclusions.A quick orientation before you start. Cloudways has been part of DigitalOcean since 2022 and now ships two separate products. Cloudways Autonomous is the autoscaling one, and it only runs WordPress and WooCommerce. For CakePHP you want the classic server-based platform, marketed as Cloudways Flexible, which starts at $11 per month for a 2 GB DigitalOcean server and also runs on Vultr, Linode, AWS and Google Compute Engine. Servers are deployed on Debian 12 with Nginx in front of Apache, Varnish, Redis, Memcached and MySQL 8.4 or MariaDB 10.11.
Step 1: Launch a server and pick the right application type
When you create a server, Cloudways asks which application to install on it. The one-click list includes WordPress, WooCommerce, WordPress Multisite, Magento, Laravel and Custom PHP Application. Pick Custom PHP Application. There is no CakePHP entry, and picking WordPress just leaves you deleting a WordPress install before you can start.
Size the server for what you are building. 1 GB is enough to serve a small CakePHP app but tight for running Composer, MySQL and Varnish at the same time; 2 GB is the sensible floor. Choose a region near your users, name the app something you will recognize over SSH, and launch. Provisioning takes a few minutes.
Step 2: Get your credentials and learn the folder layout
Two sets of credentials exist and people mix them up constantly. Master Credentials, on the Server Management page, give you SSH and SFTP access to the whole server as the master user. Application credentials, under Application Management → Access Details, are scoped to one app and are what you hand a contractor. Server Management also has a Launch SSH Terminal button if you would rather not use a local client.
The layout you land in looks like this:
/home/master/applications/<app-folder>/
public_html/ <- served to the internet
private_html/ <- not served; good place for shared config
tmp/
logs/The <app-folder> is a random-looking string, not the name you typed. You will find it on the Access Details page. Note that tmp/ and logs/ at that level belong to Cloudways, not to CakePHP — CakePHP has its own inside the project.
Step 3: Install CakePHP with Composer
Composer 2 is already on the server, so this is one command. Install into a subfolder of public_html rather than into public_html itself, because create-project refuses to scaffold into a directory that already has files in it.
cd applications/<app-folder>/public_html
COMPOSER_MEMORY_LIMIT=-1 composer create-project --prefer-dist cakephp/app:~5.0 cakeapp
cd cakeapp
composer install --no-dev --optimize-autoloaderThe COMPOSER_MEMORY_LIMIT=-1 prefix is not optional folklore. On a 1 GB server the CLI PHP memory limit will kill the dependency resolver partway through, and the error you get is a generic allowed-memory-exhausted fatal rather than anything helpful.
You now have public_html/cakeapp/webroot/index.php. Nothing works yet, because the server is still serving public_html.
Step 4: Change the Webroot field
This is the step that decides whether your app is secure. In the console go to Applications, select your app, open Application Settings, and find the field labeled Webroot. Cloudways requires the value to resolve to a directory inside public_html, and it is expressed relative to public_html. Enter:
cakeapp/webrootSave it. Cloudways rewrites the vhost and reloads the web server. Load your app URL and you should see the CakePHP welcome page. Then check the thing that actually matters:
curl -I https://your-app-url/config/app_local.php
curl -I https://your-app-url/vendor/autoload.phpBoth must return 404. If either returns 200 or 403, the webroot change did not take and your source tree is exposed. Why this matters at all is covered in more depth in our broader guide to running CakePHP on cloud hosting — the rule is the same on every platform.
Step 5: Wire up the database
Cloudways created a database when it created the app. The name, user and password are on the Access Details page, and there is a Launch Database Manager button next to them that opens a web SQL client. You do not need to create anything.
Copy the example config and edit it:
cp config/app_local.example.php config/app_local.php
nano config/app_local.phpSet the Datasources.default block to 'host' => 'localhost' with the username, password and database from Access Details. While you are in there, set 'debug' => false and paste a fresh 64-character random string into Security.salt. Then run the migrations and clear the cache:
bin/cake migrations migrate
bin/cake cache clear_allStep 6: PHP version and extensions
New Cloudways servers default to PHP 8.2, which is exactly the minimum CakePHP 5.x accepts. You can change it under Server Management → Settings & Packages → Packages, where 7.4 through 8.4 are offered. PHP 8.3 is my default choice here; 8.4 needs a Debian 11 or 12 server, which any server built after late 2023 will be.
intl, mbstring, simplexml and pdo_mysql are all enabled by default on every PHP version Cloudways ships. If you ever do need an extension that is not in the base image, Cloudways’ own documentation says to open a ticket or Live Chat and ask them to enable it.Confirm what the web server sees, not just what the CLI sees:
php -m | grep -E 'intl|mbstring|SimpleXML|pdo_mysql'Step 7: SSL and forcing HTTPS
Point your domain at the server IP first, add the domain under Application Management → Domain Management, then go to Application Management → SSL Certificate, choose Let’s Encrypt, enter an email and your domain, and click Install Certificate. Renewal is automatic — Cloudways renews within 30 days of expiry. Once the certificate is live, click Enable HTTPS to force the redirect at the server level.
Belt and braces: add CakePHP’s own HttpsEnforcerMiddleware to the middleware queue in src/Application.php as well. If someone later clones the app to a new server and forgets the toggle, the framework still refuses to serve over plain HTTP.
Step 8: Staging with Clone App
Cloudways’ cloning is the nicest part of this platform for a framework app. From Servers → your server → www → your application, open the Quick Actions menu and choose Clone App/Create Staging. You can clone onto the same server, a different server, or a brand-new one.
Two things to know before you rely on it. Staging applications cannot themselves be cloned, so build your workflow as production → staging, never staging → staging. And the clone copies files and the database but not your DNS or your SSL certificate, so a cloned app arrives on a Cloudways-generated URL over HTTP until you issue a certificate for it. Because a clone carries your config/app_local.php with it, edit the copy immediately: new database credentials, and keep debug false unless the staging URL is behind IP restrictions.
What to change versus the Cloudways defaults
| Setting | Cloudways default | What CakePHP needs | Where to change it |
|---|---|---|---|
| Application type | WordPress is preselected | Custom PHP Application | The Add Application dialog, at launch time |
| Webroot | public_html | cakeapp/webroot | Applications → app → Application Settings → Webroot |
| PHP version | 8.2 | 8.2 works; 8.3 or 8.4 preferred | Server Management → Settings & Packages → Packages |
| Varnish | Enabled server-wide | Off, or exclusions for every dynamic route | Manage Services (server) or Application Settings → Varnish (per app) |
| Composer memory | Bound by the CLI memory limit | COMPOSER_MEMORY_LIMIT=-1 | Per command, over SSH |
| debug | true in the skeleton | false | config/app_local.php |
| Cron for queue and scheduled tasks | None | A cron entry, or Supervisor for a long-lived worker | Application Management → Cron Job Management |
| SSL | None on a new app | Let’s Encrypt plus Enable HTTPS | Application Management → SSL Certificate |
Troubleshooting
The webroot change isn’t taking effect
Three causes, in order of frequency. First, the path is wrong: it is relative to public_html, so cakeapp/webroot is right and /public_html/cakeapp/webroot is not. Second, the directory has no index file yet, so the platform silently keeps the old root — make sure webroot/index.php exists before you save. Third, you are looking at a cached page: Varnish will happily serve the old document root for the rest of its TTL. Purge the application cache and retest with curl, not a browser.
Varnish is breaking a dynamic app
Varnish runs by default and it does not know your session cookies from your CSRF tokens. Symptoms are unmistakable: a logged-out header on a logged-in page, form submissions failing CSRF validation, POST responses that look stale. For an app with any authenticated area, turn Varnish off in Server Management → Manage Services and rely on Redis or Memcached for CakePHP’s own cache instead. If you want to keep it for a mostly-public site, add exclusions under Application Settings → Varnish with Add New Exclusion for every route that returns per-user output.
Composer runs out of memory
COMPOSER_MEMORY_LIMIT=-1 fixes it in most cases. If the process is instead killed by the kernel — you will see “Killed” with no PHP error — the server itself is out of RAM. Add a swap file, or run composer update --no-dev on your laptop, commit composer.lock, and only ever run composer install --no-dev on the server. Installing from a lock file needs a fraction of the memory that resolving one does.
“Please enable intl”
Surprising on Cloudways, because intl ships enabled on every PHP version they offer. When it happens it is almost always a version mismatch: you changed the app’s PHP version and the CLI is still pointed at the old binary, or you are running bin/cake under a PHP build that differs from the one serving the site. Run php -v and compare it to the version shown in the console, and if they differ, invoke the versioned binary explicitly (for example php8.3 bin/cake migrations migrate).
Permission errors after a deploy
If you SFTP files in as the master user and the web server runs as the application user, CakePHP will fail to write its cache. Reset ownership from the console — Cloudways has a “reset file and folder permissions” action for exactly this — and afterwards do your deploys over SSH as the application user rather than by dragging files in.
Frequently asked questions
Does Cloudways support CakePHP officially?
Yes, in the sense that CakePHP is one of the frameworks their documentation names as deployable on the PHP stack. There is no one-click CakePHP installer, so you install it with Composer yourself. Support will help with server-level issues but not with your application code.
Can I install CakePHP on Cloudways Autonomous?
No. Autonomous only runs WordPress and WooCommerce. For CakePHP you need the server-based Cloudways Flexible product, where you choose your own cloud provider and get SSH access to a real server.
Where exactly do CakePHP files go on Cloudways?
Inside applications/<app-folder>/public_html/. Put the whole project in a subfolder there, then set the Webroot field to <subfolder>/webroot. Cloudways requires the served directory to live under public_html, so you cannot park the project alongside it.
How do I run CakePHP queue workers on Cloudways?
Enable Supervisor from Server Management → Settings & Packages → Packages, then have it run bin/cake queue worker. For light workloads a cron entry that runs the worker with a job limit is simpler and cannot leak memory indefinitely.
Should I use Cloudways or a plain VPS for CakePHP?
Cloudways if you want backups, staging, TLS and monitoring handled for a platform fee on top of the server. A plain VPS if you want the lowest bill and full control over the stack. Our comparison of the three realistic CakePHP hosting shapes lays out the trade-off with prices.
Can I add search to a CakePHP app on the same server?
Yes. Cloudways offers a search engine package you can enable per server, and the sizing rules are strict enough to deserve their own guide — see installing Elasticsearch on Cloudways before you enable it on a 1 GB box.
Wrapping up
Installing CakePHP on Cloudways is a Composer install plus one field. Get the Webroot value right and verify it with curl; leave Varnish enabled in front of an authenticated app and you will spend a weekend chasing ghosts. The platform’s real value for framework work shows up later — cloning production to staging in a couple of clicks, one-click TLS, and never having to patch a kernel.
If you are evaluating platforms rather than committed to this one, the honest comparison is against a bare VPS you configure yourself, which is cheaper and more flexible but yours to maintain. And if you are migrating an older PHP app onto modern hosting, check whether the framework is still alive first: our write-up on deploying FuelPHP on hosting and the one on installing MODX on Bluehost both cover what to do when the stack you inherited has stopped moving. For the canonical requirements, the CakePHP installation docs and the Cloudways web root article are the two pages worth bookmarking.
About this article: GeekBlog covers U.S. technology news, AI, phones, smartwatches and gaming. Every story is written and checked under our Editorial Policy. Spotted a mistake or have a story tip? Contact our editors.

