Achieve sub-second WordPress load times using server-level FastCGI page caching and Redis object caching
By following this guide, you will deploy a high-performance WordPress site powered by Nginx and PHP 8.3. Server-side FastCGI caching will serve cached HTML pages in under 50 milliseconds directly from memory.
Spin up an Ubuntu 24.04 instance with instant activation to test this tutorial:
Deploy IndSoft VPSAn Ubuntu 24.04 VPS with LEMP stack installed. Recommended: IndSoft Managed WordPress Hosting.
Create an isolated database and grant permissions for your WordPress instance.
sudo mysql -u root -p
CREATE DATABASE wp_production DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'SECURE_PASSWORD';
GRANT ALL ON wp_production.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;Download the latest verified WordPress archive directly from wordpress.org.
cd /var/www
sudo curl -O https://wordpress.org/latest.tar.gz
sudo tar -xzvf latest.tar.gz
sudo mv wordpress example.com
sudo chown -R www-data:www-data /var/www/example.com
sudo find /var/www/example.com/ -type d -exec chmod 755 {} \;
sudo find /var/www/example.com/ -type f -exec chmod 644 {} \;Add fastcgi_cache_path to /etc/nginx/nginx.conf and configure caching rules in your server block.
sudo nano /etc/nginx/conf.d/fastcgi-cache.conf
# fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
sudo systemctl reload nginxRun this quick verification check to confirm your installation is responding properly:
curl -I https://example.comQuick resolutions for frequent setup pitfalls and configuration issues.
sudo chown -R www-data:www-data /var/www/example.com/wp-content.
try_files $uri $uri/ /index.php?$args;.