Skip to content

Custom server configuration

Every SuperSpace site runs on Nginx and PHP-FPM with a tuned default configuration that works well for most WordPress sites. If you have an advanced need — a custom rewrite, a non-standard cache rule, WordPress Multisite, or different PHP-FPM process limits — you can override that configuration by placing your own files in the site's nginx/ directory. (For the bigger picture of how a site runs, see The platform.)

This is an advanced, power-user feature

A broken config file can stop Nginx or PHP-FPM from starting and take your site offline. Change one file at a time, keep a copy of anything that works, and know that you can always revert by deleting your custom file and restarting (see Reverting to the defaults).

Where the files go

The override files live in the nginx/ directory at the root of your site's volume:

/home/sftpuser/apps/{{ container name }}/wordpress/nginx/

Reach it with any of the file-access methods — SFTP, SSH, the File Manager, or Cloud Shell. See Accessing your files for how to connect.

The files you can override

Drop a file with one of these exact names into the nginx/ directory. Only the exact filename is used — there is no .sample or .example suffix on an active file.

File Replaces What it controls
nginx/site.conf The site's Nginx server block root/webroot, location blocks, rewrites and redirects, headers, and the per-site caching rules
nginx/nginx.conf The global Nginx config Worker processes and connections, gzip, buffers, the FastCGI cache zone, real-IP, and global logging
nginx/pool.conf The PHP-FPM pool config Process manager mode, pm.max_children, pm.max_requests, and php_admin_value[…] settings such as upload size

Add or change a config file

  1. Open the nginx/ directory. Connect with SFTP, SSH, the File Manager, or Cloud Shell.

  2. Create the file with its exact namesite.conf, nginx.conf, or pool.conf. The easiest starting point is to base it on a known-good default (see The defaults below) and change only what you need.

  3. Restart the site. In the SuperSpace dashboard, open the site's Settings and use the Restart action. SuperSpace installs your config files into the running container on each boot, so the change only takes effect after a restart.

WordPress Multisite

SuperSpace seeds example server blocks for Multisite into the nginx/ directory — multisite-subdirectory.conf.example and multisite-subdomain.conf.example. To enable Multisite, copy the one you want to site.conf (dropping the .example suffix), adjust it as needed, and restart.

The defaults

Knowing the baseline makes it easier to override just what you need. The shipped defaults include:

  • nginx.confworker_processes 2, gzip on, a 100M client body limit, and a FastCGI cache zone named WORDPRESS (500 MB, stored at /var/run/nginx-cache, 60-minute TTL).
  • pool.conf — a static process manager with pm.max_children = 3 and pm.max_requests = 2000, listening on /tmp/php-fpm.sock, with 100M upload and post limits.

A trimmed pool.conf looks like this:

[www]
user = www-data
group = www-data
listen = /tmp/php-fpm.sock
pm = static
pm.max_children = 3
pm.max_requests = 2000

php_admin_value[upload_max_filesize] = 100M
php_admin_value[post_max_size] = 100M

Sizing PHP-FPM workers

Each PHP-FPM worker (pm.max_children) can use up to your PHP memory limit, so pm.max_children × per-process memory must fit inside the site's RAM. A good starting point is to match pm.max_children to the site's CPU core count, then adjust. Setting it too high can cause the container to run out of memory.

Custom site.conf and caching

SuperSpace's built-in cache controls operate on the default server block: the dashboard's cache enable/disable and the nginx.cache.enabled setting in cloudpress.yml both work by editing that file.

Once you supply your own site.conf, those automatic controls no longer manage it — you own the caching directives in your file. If you want FastCGI caching, copy the fastcgi_cache rules and the $no_cache conditions from the default server block into your site.conf and tune them there.

Reverting to the defaults

If a customization causes problems, delete the custom file (site.conf, nginx.conf, or pool.conf) from the nginx/ directory and restart the site. SuperSpace falls back to its shipped default for any file you haven't overridden, so removing your file cleanly restores the original behavior.

  • Configuration file — the cloudpress.yml file, which controls the webroot, WordPress paths, and the built-in cache toggle.
  • Scheduled tasks (cron) — add your own scheduled commands via the crontab file alongside these configs.
  • The platform — how Nginx, PHP-FPM, and your site's other containers fit together.