WordPress powers over 40% of the web. Whether you are launching a client preview site, setting up a headless CMS backend for a Next.js frontend, or running an independent developer blog, pairing WordPress with a free .devs.surf subdomain gives you an instant, professional web presence with zero domain expenses.
In this guide, we will walk through deploying WordPress on a Devs.Surf subdomain using cPanel 1-Click Installers, configuring core WordPress URL constants in wp-config.php, and resolving common redirect loops.
Method 1: Installing via cPanel Softaculous / WP Toolkit
If your hosting provider offers cPanel with Softaculous or WordPress Toolkit, the installation takes less than 2 minutes:
- Point your Devs.Surf subdomain to your hosting IP via an A record (Type:
A, Host:@, Target:<SERVER_IP>). - In cPanel, make sure the domain
myproject.devs.surfis added under Domains. - Open Softaculous Apps Installer (or WordPress Toolkit).
- Click Install Now.
- Under Choose Installation URL:
- Protocol: select
https://(ensure your AutoSSL certificate has already finished issuing). - Choose Domain: select
myproject.devs.surffrom the dropdown list. - In Directory: leave this completely blank so WordPress installs at the root of your subdomain.
- Protocol: select
- Fill out your Admin Username, Password, and Site Title.
- Click Install.
Method 2: Configuring an Existing WordPress Installation
If you already have WordPress installed on a server and want to point your new Devs.Surf subdomain to it, you must update the site URLs to avoid ERR_TOO_MANY_REDIRECTS loops.
Step 1: Update wp-config.php Constants
Open your WordPress installation's wp-config.php file and insert these two lines directly above the line that says /* That's all, stop editing! Happy publishing. */:
define('WP_HOME', 'https://myproject.devs.surf');
define('WP_SITEURL', 'https://myproject.devs.surf');
Defining these constants in wp-config.php immediately overrides the database values, preventing WordPress from redirecting requests back to the old URL.
Step 2: Reverse Proxy & Cloudflare SSL Fix
If your WordPress site sits behind an Nginx reverse proxy, Cloudflare CDN, or load balancer, Apache might not detect that the client requested HTTPS, causing an infinite redirect loop between HTTP and HTTPS. Fix this by adding this block to the very top of wp-config.php:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
Method 3: Headless WordPress (Backend API for Next.js / Astro)
A popular modern architecture among developers is using a free .devs.surf subdomain as a dedicated Headless WordPress backend:
- Point
cms.devs.surforapi.devs.surfto your WordPress installation. - Install the WPGraphQL plugin or use the core REST API (
/wp-json/wp/v2/posts). - Deploy your frontend (Next.js, Nuxt, Astro, or SvelteKit) on Vercel or Cloudflare Pages with another free subdomain (e.g.
app.devs.surf). - In your frontend
.envfile, configure:WORDPRESS_API_URL=https://cms.devs.surf/graphql
Nginx Server Block for WordPress on VPS
If you self-host WordPress on an Ubuntu VPS with Nginx and PHP-FPM, use this optimized configuration:
server {
listen 80;
server_name myproject.devs.surf;
root /var/www/myproject;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
After saving, run certbot --nginx -d myproject.devs.surf to obtain an automatic Let's Encrypt SSL certificate.