From Wordpress to Directus, but on what server/domain?

This is Directus official forum, right? Cool, looking forward to build with Directus. :melting_face: I’m not a dev and I have the first of several dummy questions.

My current site is on Wordpress. Now I want to prepare the new backend with Directus until I’m ready to hire a dev and design the frontend. So, one day we’ll remove the current live site and install the new Directus-built frontend on the same domain. So, the question is: where should I install Directus now? On a subdomain, or just a directory under the current /home/?

One first issue I’m encountering is my host saying that Docker is not officially supported by cPanel, as it may interfere with critical services such as Apache, Exim, and networking… therefore I would need to purchase a VPS server that doesn’t have cPanel. This would make my first question even harder: will it be possible to migrate from one server-without-cpanel to the current VPS-with-cpanel that is hosting the domain?

I hope I have made myself clear :upside_down_face:

1 Like

Hey there @Criss

Great question, and welcome to the Directus community.

To answer your points step-by-step:

Where to install Directus

Since your current live site is running on WordPress, the best approach right now is to install Directus on a subdomain, for example: admin.yourdomain.com

This keeps your live WordPress site untouched while you build and experiment with Directus in the background.
Later, when your new frontend is ready, you can easily switch your main domain (yourdomain.com) to point to the new frontend while keeping Directus running on the subdomain (which acts as your headless CMS backend).

Tip: Most production setups keep Directus on a subdomain even after launch, since it’s not meant to be public-facing.


About Docker and cPanel

Your hosting provider is correct — Docker isn’t officially supported on cPanel-managed servers, because cPanel controls Apache, ports, and networking.
If you want to use Docker (which is the easiest way to deploy and manage Directus), you’ll need a VPS or cloud instance without cPanel (for example, on DigitalOcean, Hetzner, or AWS).

If your current VPS has cPanel, you can:

  • Either install Directus without Docker (manually using Node.js, npm, and a database like MySQL/PostgreSQL).
  • Or get a separate small VPS just for Directus, which is often the cleaner option.

Migration later

Yes, it’s absolutely possible to migrate later from one server to another (even from a non-cPanel VPS to a cPanel VPS or vice versa).
Directus is just a Node.js app with a database — so migration typically involves:

  1. Exporting/importing your database.
  2. Copying your /uploads (or storage) folder.
  3. Copying your .env file and reinstalling dependencies.

That’s it. As long as your database and storage are backed up, you can move Directus anywhere.


In short

  • Install Directus on a subdomain (e.g., admin.yourdomain.com).
  • Avoid cPanel if you plan to use Docker.
  • Migration between servers is straightforward later.
  • Your live WordPress site stays safe while you build your new backend.

There has been a Github discussion regarding cPanel. Seems like the original proposed approaches aren’t working anymore, but it may get you started.

That said, as far as I know, Directus dropped support for Node hosting, among other reasons, due to the dependency issues you mentioned. Hosting on Docker will save both you and your customer a lot of trouble and also make upgrading to new versions much easier.

I really don’t know much about cPanel and it’s limitations, so let me just dump ChatGPTs assessment. Can’t verify it, but most of it sounds reasonable to me. You might get it up and running somehow, but I doubt the, most likely, hours of work are worth it compared to 5-10 bucks/month for a small VPS.

:warning: 1. Process Management (Lifecycle & Stability)

Problem:
cPanel isn’t designed for always-on Node.js processes. Most shared hosts use Passenger (via CloudLinux) to start Node apps on demand — meaning:

  • Your app may stop when idle.
  • It only restarts when the next HTTP request arrives.
  • Crashes aren’t automatically recovered (no process supervisor like PM2 or systemd).

Impact:
Admin API sessions or scheduled tasks can fail unexpectedly. WebSocket connections (used by Directus) can drop or never reconnect properly.


:gear: 2. Memory & CPU Limits

Problem:
Shared cPanel environments usually impose strict per-account resource caps — often:

  • 256–512 MB RAM
  • 1 CPU core (or less shared)

Directus runs a fairly heavy Node process (with database connections, caching, and schema introspection), so:

  • It may hit memory limits during schema sync or file uploads.
  • Crashes (“out of memory”) or unresponsive admin UI can occur under modest load.

Impact:
Performance becomes unstable or the process gets killed by the host’s resource limiter.


:spouting_whale: 3. No Container or Dependency Isolation

Problem:
cPanel environments don’t provide containerized isolation or dependency version pinning.
Directus relies on specific Node and dependency versions (e.g., Node 18+, exact knex/sqlite versions).

Impact:

  • Dependency conflicts between apps.
  • “Works locally, breaks on cPanel” issues.
  • Upgrading Directus can break the environment because dependencies get rebuilt globally.

:locked_with_key: 4. File System Permissions

Problem:
Uploads, extensions, and cache directories need writable access by the same user that runs Node.
But cPanel often uses different users for Apache/PHP and Node processes, with restrictive umask settings.

Impact:

  • Image uploads or cache writes fail (EACCES errors).
  • File permissions need manual fixing via SSH after each deployment.
  • Automatic migrations or logs may silently fail.

:file_cabinet: 5. Database Connectivity

Problem:
Many shared hosts don’t allow local MySQL socket access from Node, or they throttle DB connections.
Remote MySQL access (if used) adds latency and connection timeout risk.

Impact:

  • “Knex: timeout acquiring a connection” errors.
  • Random disconnects during schema operations.
  • Painful debugging since logs are limited in cPanel.

:counterclockwise_arrows_button: 6. Upgrade & Maintenance Difficulty

Problem:
Each Directus upgrade involves npm install and sometimes schema migrations.
Without Docker or CI/CD, you must handle:

  • Dependency updates manually.
  • Potential version conflicts.
  • Restarting the app by hand in cPanel.

Impact:
Upgrades are slow, error-prone, and often break the running instance until manually fixed.


:stopwatch: 7. HTTP Timeout & Proxy Issues

Problem:
Apache (the web server behind most cPanel setups) uses reverse proxy rules to route to your Node app.
If Directus runs on a custom port, Apache’s proxy can:

  • Timeout long API calls (especially uploads or large responses).
  • Fail to preserve WebSocket connections.

Impact:
File uploads or real-time updates in the admin panel can hang or drop.
You may see errors like 502 Bad Gateway or 504 Gateway Timeout.


:puzzle_piece: 8. Limited Environment Variable & Port Flexibility

Problem:
Directus needs multiple environment variables (KEY, SECRET, DB credentials, etc.), but cPanel’s Node app UI is basic — sometimes limited to a handful of vars.
Also, only one port is available per Node app, which can be restrictive if you need multiple instances.

Impact:
Workarounds (like .env files) become necessary and debugging configuration issues is harder.


:package: 9. No Background Jobs or Scheduling

Problem:
Directus can run background tasks (flows, hooks, cron-like operations).
cPanel doesn’t allow persistent background workers or daemons unless you set up a cron job to hit the app periodically — which is fragile.

Impact:
Automations or delayed tasks can fail silently or never trigger.


:toolbox: 10. Logging & Debugging Constraints

Problem:
cPanel provides limited access to Node stdout/stderr.
You can view passenger.log or limited error logs, but not structured Directus logs.

Impact:
Diagnosing API crashes, hook failures, or DB errors becomes cumbersome — especially when multiple processes are spawned.

That is a nice and helpful contribution, thank you! I have also succeeded in installing Directus locally, so that later I will migrate it to the new server, with the help of a developer (or my host). :zany_face:

I would highly recommend taking a look at a platform as a service offering like Railway for hosting nowadays. It’s so much easier to manage and maintain than cPanel especially for cloud native applications like Directus

Thanks a lot for the clarifications, So Docker is not mandatory, I guess I prefer to stay in the same server (subdomain option) then I need to install it with one of the other options. Can I do it not being a developer, maybe following some step-by-step tutorial? Do you know any?

I have followed some tutorials, I have installed node.js + npm + created the database for directus in the subdomain, but while installing Directus I got some deprecated errors. Google AI mentions that the node.js version should be an active LTS, and I thought that installing the latest 22 version would be the best option. What am I doing wrong?

I kept going and tried “npx directus init” command, but I got a “out of memory: cannot allocate Wasm memory” error

I would like to know what problems/conflicts would cPanel really have on Directus. It sounds like even the Node.js/np option is not a good one. That would leave me with installing Directus on my local machine, but then a developer would not have access to it. Sorry for the silly questions but I’m new to these things….

I’m learning. For the moment my client doesn’t want to upgrade the VPS to a dedicated server, neither I want to use other hostings (e.g Railways), thus I must workaround the cPanel issues and install my Directus on a subdomain.

I read about the option of deploying the remote version of Directus via “Git Version Control” inside cPanel. Is that a good idea? Would it be an advantage for the developer, instead of sharing my localhost folder?

I also read that it’s better to use Directus with Postgres instead of MySQL. Is it so?

I’ve come to a point where I’m stuck. I want to install Directus on a plain VPS server without cPanel but I would not have any kind of panel then. Everythng would be run via terminal and therefore I’d be tied to the developer for any task (even creating an email account). I need a real pro/cons of running Directus with/without cPanel. Can you people be specific about the issues I can encounter?

I didn’t work with cPanel myself, but from what I understand, it’s mainly a panel to simplify server management emails, domains, files, PHP apps, etc.

What I can share from my own experience:

I bought a very basic VPS (around $5/month, in my case OVH) and just tried deploying Directus with Docker. I’m not a sysadmin, just a technically curious person. With the help of an LLM, I managed to get everything running in about two days, including backups and basic setup.

A few important points from my side:

  • You are not locked to a developer just because you don’t have cPanel.
    For me, the LLM effectively replaces a sysadmin for day-to-day questions and setup tasks.

  • If you want a visual interface, you can look at Portainer etc.
    I personally decided not to use it to avoid extra resource usage and just work directly with Docker, but it’s a valid option.

  • Once Directus is running, most work happens inside Directus itself, not on the server.

I don’t know your technical background, but my honest suggestion would be:
just try it.

After I subscribed to Claude Code, I became much faster at diving into things I didn’t fully understand before. Even in one evening, you’ll either realize “this isn’t as scary as I thought” or you’ll clearly see that it’s not for you. Both outcomes are valuable.

If it helps, I can also share the migration/setup file I used and the steps I followed maybe it gives you a clearer picture of what’s actually involved.

vps-migration-plan - redacted.md (4.2 KB)

The basic VPS option was very much considered, but I have the necessity to still run some websites with cPanel. On the other hand, I don’t want to use Diretus with “adjustments” (like Portainer) in order to avoid conflicts with cPanel. So with the help of my host we concluded that instead of 2 servers is better to have a dedicated one (using Ubuntu + Plesk + Docker), which would allow me to use Directus and still manage websites with a dummy-proof panel. Only bad thing is the price of the server.

Does it sound feasible?

That setup does sound feasible, yes especially if you really need a panel for managing websites and email.

In my case, I went the opposite way:
we already have company servers with admin, but I intentionally chose a separate small VPS just for Directus, so I wouldn’t need to bother an admin with every small change or be blocked by internal processes.

I’m running Directus on a basic VPS (8 GB RAM) that costs me about $5/month.
For my workload, that’s more than enough and probably will be for a long time.

Personally, I don’t really see a big problem in having two VPS:

  • one with cPanel / Plesk for websites and email
  • one clean VPS just for Directus + Docker

In practice, the hosting provider will likely charge more than $5 extra for a bigger all-in-one server anyway, especially once panel licensing is included.

That said, you know your business better than anyone:

  • if Directus will have higher load
  • if you prefer one server to manage
  • if having a “dummy-proof” panel is critical for your workflow

In my case the load is small, autonomy was more important, and having a cheap isolated VPS gave me freedom and peace of mind.
And just to add one more thought, in IT there are very rarely “correct” solutions in the mathematical sense.
I personally realized this through self-hosting: almost every option works, but each comes with different trade-offs. What really matters is choosing the approach that feels right to you.
If later something turns out to be more complex or limiting than expected, it’s much easier to accept it when it was your own conscious choice, not something imposed by circumstances or advice.
So go with the setup that aligns best with how you think and work either way, it will work.

Good luck with the setup :+1: