Close Menu
GeekBlog

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    This Clock Would Take 260 Billion Years to Lose One Second. The Universe Is 13.8 Billion Years Old.

    October 4, 2026

    One UI 9 Watch Beta Now Covers Three Galaxy Watch Generations: What You Get and How to Join

    October 4, 2026

    NASA Found Possible Signs of Life on Mars. To Check, It Went to a Beach in Scotland.

    October 4, 2026
    Facebook
    GeekBlog
    • Home
    • Mobile
    • Tech News
    • Blog
    • Gaming
    • Smartwatch
    • How-To Guides
    • AI & Software
    Facebook
    GeekBlog
    Home»Blog»Installing CakePHP on Cloudways: Step-by-Step
    Blog

    Installing CakePHP on Cloudways: Step-by-Step

    Ethan CaldwellBy Ethan CaldwellJuly 30, 202612 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    Code editor on a laptop used for installing CakePHP on Cloudways
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link

    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.

    Quick answer: Launch a Cloudways server, add a Custom PHP Application, SSH in with your Master Credentials, then run 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.

    Tip: The Laravel app type also works for CakePHP if you would rather not fight the webroot field. It is the same PHP stack, but it ships with the webroot already set one level down and Supervisor available for queue workers. You then delete the Laravel skeleton and put CakePHP in its place.

    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-autoloader

    The 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:

    Recommended for you:

    How to Run CakePHP on Cloud Hosting (2026 Guide)
    Blog·Jul 30, 2026

    How to Run CakePHP on Cloud Hosting (2026 Guide)

    cakeapp/webroot

    Save 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.php

    Both 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.php

    Set 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_all

    Step 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.

    Updated July 2026: There is no self-serve PHP extension installer on Cloudways, contrary to a lot of older tutorials. The good news is that you do not need one for CakePHP: 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

    SettingCloudways defaultWhat CakePHP needsWhere to change it
    Application typeWordPress is preselectedCustom PHP ApplicationThe Add Application dialog, at launch time
    Webrootpublic_htmlcakeapp/webrootApplications → app → Application Settings → Webroot
    PHP version8.28.2 works; 8.3 or 8.4 preferredServer Management → Settings & Packages → Packages
    VarnishEnabled server-wideOff, or exclusions for every dynamic routeManage Services (server) or Application Settings → Varnish (per app)
    Composer memoryBound by the CLI memory limitCOMPOSER_MEMORY_LIMIT=-1Per command, over SSH
    debugtrue in the skeletonfalseconfig/app_local.php
    Cron for queue and scheduled tasksNoneA cron entry, or Supervisor for a long-lived workerApplication Management → Cron Job Management
    SSLNone on a new appLet’s Encrypt plus Enable HTTPSApplication 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?

    Recommended for you:

    How to Install MODX on Bluehost (2026 Guide)
    Blog·Jul 30, 2026

    How to Install MODX on Bluehost (2026 Guide)

    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.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email Copy Link
    Previous ArticleHow to Run CakePHP on Cloud Hosting (2026 Guide)
    Next Article How to Run a Database Query in WordPress (4 Safe Methods)
    Ethan Caldwell

      Ethan Caldwell is GeekBlog's resident Apple specialist, covering the entire Apple ecosystem: iPhone, iPad, Mac, Apple Watch, AirPods and the software that ties them together. A longtime iOS user and gadget collector, Ethan tracks Cupertino's every move, breaking down Apple keynotes, A- and M-series chip benchmarks, iOS feature updates and the rumor mill into clear, practical takes that help readers decide whether the latest Apple hardware is worth the upgrade.

      Related Posts

      10 Mins Read

      Google Ads Keyword Planner: How It Shows the Most Relevant Keywords

      11 Mins Read

      How to Use Remarketing Techniques for Better Conversions

      11 Mins Read

      How to Conduct A/B Testing for Marketing Campaigns

      10 Mins Read

      AMP for WP Plugin Vulnerability: What Was Fixed and What to Do

      11 Mins Read

      How to Create a Facebook Business Page in 2026

      11 Mins Read

      How to Convert GMT Time to Other Time Zones in C++

      Top Posts

      Best Free Online Music Apps in 2026

      July 7, 20263 Views

      Samsung Phones With the Best Camera Quality, Ranked

      July 4, 20262 Views

      When Is Anthropic Going Public? IPO Status 2026

      July 4, 20262 Views
      Stay In Touch
      • Facebook

      Subscribe to Updates

      Get the latest tech news from FooBar about tech, design and biz.

      Most Popular

      The Mesh Router Placement Strategy That Finally Gave Me Full Home Coverage

      September 9, 20263 Views

      Best Android Smartwatches in 2026: Which One Actually Fits Your Phone

      September 7, 20262 Views

      Gears of War: E-Day Reviews Are In: Best Gears in 15 Years, but the Campaign Drags

      October 1, 20261 Views
      Our Picks

      This Clock Would Take 260 Billion Years to Lose One Second. The Universe Is 13.8 Billion Years Old.

      October 4, 2026

      One UI 9 Watch Beta Now Covers Three Galaxy Watch Generations: What You Get and How to Join

      October 4, 2026

      NASA Found Possible Signs of Life on Mars. To Check, It Went to a Beach in Scotland.

      October 4, 2026

      Subscribe to Updates

      Get the latest creative news from FooBar about art, design and business.

      HEICJPG.online - Convert HEIC to JPG online
      Facebook
      • About Us
      • Contact us
      • Privacy Policy
      • Disclaimer
      • Terms and Conditions
      • Editorial Policy
      • Cookie Policy
      • Your Privacy Choices
      © 2026 GeekBlog

      Type above and press Enter to search. Press Esc to cancel.