Why WordPress on DMIT
WordPress is the world's most widely used site platform — modest in requirements but hungry for PHP and database performance. DMIT cloud servers provide dedicated vCPU, SSD and selectable optimised routes, making them a solid host for production WordPress sites. This guide walks through deploying a high-performance WordPress site from scratch.
Prerequisites
- An initialised DMIT instance (2 vCPU / 2GB recommended, see First Deploy Checklist)
- Domain A/AAAA records pointing to the server IP (see DNS & Domain Setup)
- Security hardening done (see SSH Hardening)
Install the LEMP stack
# Debian/Ubuntu
apt update
apt install nginx mariadb-server php-fpm php-mysql php-curl php-gd php-intl \
php-mbstring php-soap php-xml php-xmlrpc php-zip -y
# secure the database
mysql_secure_installation
Create the WordPress database and user:
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'strong-password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
Download and configure WordPress
cd /var/www
curl -O https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
chown -R www-data:www-data /var/www/wordpress
cp wordpress/wp-config-sample.php wordpress/wp-config.php
Edit wp-config.php with the database name, user and password, and replace the key section with output from the official salt generator:
curl -s https://api.wordpress.org/secret-key/1.1/salt/
Nginx site config
server {
listen 80;
server_name example.com www.example.com;
root /var/www/wordpress;
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.2-fpm.sock;
}
location ~* \.(css|js|png|jpg|jpeg|webp|svg|woff2)$ {
expires 30d;
add_header Cache-Control "public";
}
}
Enable the site, issue an HTTPS certificate for the domain (see HTTPS/SSL Setup), then visit the domain to finish the five-minute install wizard.
Performance essentials
- PHP OPcache: ensure
opcache.enable=1— cuts repeated PHP compilation sharply - Page cache plugin: WP Super Cache or W3 Total Cache turns dynamic pages into static HTML
- Object cache: install Redis and enable the
redis-cacheplugin for query caching - Image compression: use WebP and lazy loading
- CDN: add Cloudflare to accelerate static assets (see Cloudflare CDN Setup)
Deeper system/Nginx tuning in Performance Tuning; database layer in Database Optimisation.
Backup and update policy
- Daily database backups + weekly full site backups (see Monitoring & Backup)
- Keep core, themes and plugins updated; back up before updating
- Remove unused plugins — abandoned plugins are the most common entry point
Common issues
Admin dashboard very slow?
Usually slow database queries or a missing object cache. Diagnose with the slow query log (see Database Optimisation) and add Redis object caching.
413 error on upload?
# inside the http block of nginx.conf
client_max_body_size 64m;
Permalinks return 404?
Make sure Nginx includes try_files $uri $uri/ /index.php?$args;, then re-save the permalink settings once in wp-admin.
Related articles
DNS & Domain Setup, Docker Deployment Guide, Troubleshooting Guide.
Data checked: 2026-08-18. Software versions follow official documentation.