Configuring a Server for the Latest Version of WordPress
Configuring a server for the latest version of WordPress
requires the correct PHP version, database software, web-server configuration,
HTTPS, caching, backups and security controls.
A properly configured server can improve website speed, reduce downtime,
strengthen security and prevent common problems such as upload errors,
redirect loops, database connection failures and exhausted PHP memory.
Latest WordPress Version and Server Requirements
At the time this guide was updated on 25 October 2026, WordPress 7.1.3 was
the latest stable production release. WordPress 7.2 Beta is available only
for testing and should not be used on a production website.
WordPress currently recommends a server supporting:
- PHP version 8.3 or later
- MariaDB 10.11 or later, or MySQL 8.0 or later
- HTTPS support
- Nginx or Apache web server
Always confirm the requirements on
the official WordPress requirements page
before configuring a new server.
1. Choose Suitable Server Resources
WordPress can run on relatively modest hosting, but the correct server size
depends on traffic, plugins, page builders, background tasks and whether the
website uses WooCommerce.
| Website Type | Suggested Starting CPU | Suggested RAM | Storage |
|---|---|---|---|
| Small blog or business website | 2 vCPU | 2–4 GB | SSD or NVMe |
| Growing business website | 2–4 vCPU | 4–8 GB | NVMe recommended |
| WooCommerce website | 4+ vCPU | 8 GB or more | Fast NVMe |
| High-traffic website | 8+ vCPU | 16 GB or more | Scalable NVMe storage |
These figures are practical starting points rather than fixed WordPress
requirements. Monitor CPU, memory, database queries, PHP workers and disk
activity before upgrading the server.
2. Prepare the Operating System
Use a currently supported Linux distribution and install all available security
updates before deploying WordPress. The following example is suitable for a
Debian or Ubuntu-based server:
sudo apt update
sudo apt upgrade
Configure the correct server timezone and ensure the system clock is
synchronised. Incorrect time settings can affect scheduled posts, backups,
security logs and WooCommerce orders.
Check the current server information:
uname -a
timedatectl
df -h
free -m
3. Install Nginx or Apache
WordPress can run with Nginx or Apache. Nginx is commonly selected for its
efficient handling of static files and concurrent requests, while Apache is
popular for its broad compatibility and support for directory-level
configuration.
Install Nginx on a Debian or Ubuntu server:
sudo apt install nginx
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
Keep only the ports required by the website open. A typical public web server
needs SSH, HTTP and HTTPS, but SSH access should be restricted wherever possible.
4. Install and Configure PHP-FPM
Install a secure and supported PHP release. WordPress currently recommends PHP
8.3 or later, but you should also verify that the selected theme and plugins
support the planned PHP version.
Common PHP packages for WordPress include:
sudo apt install php-fpm php-mysql php-curl php-gd php-intl \
php-mbstring php-soap php-xml php-zip php-imagick
Check the installed version and modules:
php -v
php -m
php --ini
PHP configuration files differ by operating system and installation method.
The following values are examples and should be adjusted according to the
website’s requirements:
memory_limit = 256M
max_execution_time = 120
max_input_time = 120
max_input_vars = 3000
upload_max_filesize = 64M
post_max_size = 64M
opcache.enable = 1
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.validate_timestamps = 1
Restart PHP-FPM after changing its configuration. Replace the service name with
the actual PHP version installed on the server:
sudo systemctl restart php8.3-fpm
Increasing every PHP limit is not a performance strategy. Large limits can allow
poorly coded plugins or scripts to consume excessive server resources.
5. Install and Configure the Database
Install a supported version of MariaDB or MySQL. WordPress currently recommends
MariaDB 10.11 or later, or MySQL 8.0 or later.
Secure the database service after installation:
sudo mysql_secure_installation
Create a separate database and user for WordPress:
CREATE DATABASE wordpress_db
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
CREATE USER 'wordpress_user'@'localhost'
IDENTIFIED BY 'replace-with-a-strong-password';
GRANT ALL PRIVILEGES ON wordpress_db.*
TO 'wordpress_user'@'localhost';
FLUSH PRIVILEGES;
Replace the example database name, username and password. Do not use the
database root account in the WordPress configuration, and never publish a real
database password in documentation or source control.
6. Configure an Nginx Virtual Host
Create a separate server block for the website. The following is a simplified
reference configuration:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com/public;
index index.php index.html;
client_max_body_size 64M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\. {
deny all;
}
}
Replace the domain, document root and PHP-FPM socket with actual server values.
Confirm the PHP socket location before enabling the configuration.
Test the Nginx configuration before reloading it:
sudo nginx -t
sudo systemctl reload nginx
7. Download and Install WordPress
WordPress can be installed manually or with WP-CLI. WP-CLI provides a convenient
way to download, configure and maintain WordPress from the command line.
Example WP-CLI installation workflow:
cd /var/www/example.com/public
wp core download
wp config create \
--dbname=wordpress_db \
--dbuser=wordpress_user \
--dbpass='replace-with-a-strong-password' \
--dbhost=localhost
wp core install \
--url='https://example.com' \
--title='Example Website' \
--admin_user='site_manager' \
--admin_password='replace-with-a-unique-admin-password' \
--admin_email='admin@example.com'
Run WP-CLI as the website’s filesystem owner, not as the root user. Replace all
example values before using the commands.
Avoid using “admin” as the administrator username. Use a unique account name
and a strong password stored in a password manager.
8. Configure File Ownership and Permissions
WordPress files should not normally use unrestricted 777
permissions. A typical starting point is:
sudo chown -R deploy:www-data /var/www/example.com/public
sudo find /var/www/example.com/public \
-type d -exec chmod 755 {} \;
sudo find /var/www/example.com/public \
-type f -exec chmod 644 {} \;
sudo chmod 640 /var/www/example.com/public/wp-config.php
Replace deploy and www-data with the correct
filesystem and web-server users. Permissions vary between shared hosting,
managed hosting and private servers.
Provide write access only where required, such as the uploads directory. Avoid
giving the web-server user unrestricted write access to the entire installation.
9. Install an SSL Certificate and Force HTTPS
WordPress recommends HTTPS for protecting login details, customer information
and website sessions. Obtain an SSL certificate from a trusted certificate
provider or use a supported automated certificate service.
After confirming that HTTPS works correctly, update the WordPress Address and
Site Address to use https://.
WordPress administration can be forced over HTTPS in wp-config.php:
define( 'FORCE_SSL_ADMIN', true );
Add this setting only after the server’s SSL virtual host and certificate have
been configured correctly. Otherwise, the administrator area may become
inaccessible.
10. Replace WP-Cron with a Real Server Cron Job
By default, WordPress attempts to process scheduled tasks during website visits.
This can become unreliable on low-traffic websites and inefficient on busy sites.
Disable request-based WP-Cron in wp-config.php:
define( 'DISABLE_WP_CRON', true );
Add a server cron job under the website owner’s account. The following example
runs due events every five minutes:
*/5 * * * * cd /var/www/example.com/public && /usr/local/bin/wp cron event run --due-now --quiet >/dev/null 2>&1
Verify the actual WP-CLI path with which wp. Check scheduled
events before disabling WordPress’s default cron behaviour.
11. Configure WordPress Performance Optimisation
Performance improvements should be based on measurements rather than enabling
every available cache. A typical optimisation strategy can include:
- PHP OPcache
- Full-page caching
- Browser caching
- Redis object caching
- A content delivery network
- WebP or AVIF image formats
- Lazy loading for off-screen media
- Database query monitoring
- Removal of unused plugins and themes
Do not enable multiple page-cache systems simultaneously. Overlapping cache
plugins, server caching and CDN rules can cause outdated pages, login problems
and WooCommerce cart issues.
Exclude customer-specific pages such as cart, checkout and account areas from
full-page caching.
12. Harden and Monitor the WordPress Server
Website security requires continuous maintenance. WordPress core, plugins,
themes, PHP and the operating system should remain updated.
Recommended security measures include:
- Use SSH keys and restrict password-based server logins.
- Install WordPress only from official sources.
- Use unique administrator accounts and strong passwords.
- Enable two-factor authentication for administrators.
- Remove unused plugins and themes.
- Restrict access to configuration and backup files.
- Protect login forms from automated attacks.
- Disable dashboard file editing where appropriate.
- Maintain automated off-server backups.
- Monitor access logs, PHP errors and security alerts.
- Test backup restoration in a staging environment.
Disable theme and plugin editing through the dashboard:
define( 'DISALLOW_FILE_EDIT', true );
Do not block XML-RPC without checking whether your website uses Jetpack,
WordPress mobile applications or integrations that depend on it.
WordPress Server Configuration Checklist
- Stable WordPress release selected
- Supported PHP version installed
- Supported MySQL or MariaDB version installed
- Nginx or Apache configured
- PHP OPcache enabled
- HTTPS certificate installed
- Strong database credentials configured
- Secure file ownership and permissions applied
- Real cron job tested
- Page and object caching configured where appropriate
- Automatic backups stored off-server
- Core, plugins and themes updated
- Monitoring and security alerts enabled
- Website tested on mobile and desktop devices
Frequently Asked Questions
What is the latest stable version of WordPress?
As of 25 October 2026, WordPress 7.1.3 is the latest stable production release.
WordPress 7.2 Beta is a testing release and should not be used on a live website.
Always verify the current release on WordPress.org.
Which PHP version is recommended for WordPress?
WordPress currently recommends PHP 8.3 or later. Before upgrading, confirm that
the active theme and essential plugins support the selected PHP version.
Is Nginx or Apache better for WordPress?
Both can run WordPress successfully. Nginx is efficient for static content and
concurrent connections, while Apache offers broad compatibility and
directory-level configuration. The best choice depends on your hosting
environment and administrator experience.
How much RAM does a WordPress server need?
A small website may begin with 2–4 GB of RAM, while WooCommerce, high-traffic
websites and resource-intensive page builders may require 8 GB or more. Actual
usage should be monitored before changing server size.
Should WordPress use a real cron job?
A real server cron job can provide more reliable scheduling than request-based
WP-Cron, especially for busy or low-traffic websites. Test the server cron before
disabling the default system.
How can I secure a WordPress server?
Keep all software updated, use HTTPS, secure SSH access, apply appropriate file
permissions, enable two-factor authentication and maintain tested off-server
backups.
Need Help Configuring Your WordPress Server?
ObeySoft provides WordPress server configuration, website migration,
performance optimisation, malware troubleshooting and ongoing maintenance
services.
Contact ObeySoft for WordPress Support
or WhatsApp
+91 72200 90805.

