WordPress and VPS Optimizations tips

WordPress Tips for any VPS for best results.

Photo by Christina @ wocintechchat.com on Unsplash

VPS Hardware Optimization – BEFORE YOU DEPLOY SERVER

I suggest at least 1GB of ram with 10 GB of SSD to run any single-stand-alone VPS with a WordPress site. Looking to optimize that sweet SSD IOPS. Don’t cheap out on the CPU if available for selection, either. It might be overkill if your site is new and you spend more than 20-40$ on your server hardware per month.

I suggest following the following installation guides.
LEMP – by Digital Ocean
WordPress – by Digital Ocean
Let’s Encrypt – by Digital Ocean

https://www.digitalocean.com For International developers.

https://www.domains.co.za for South Africans looking for hosting solutions.

PHP 8.1 fpm

A minimum of 128MB of memory should be allocated to PHP for WordPress.

FPM servers are the engine of WordPress functionality.


As a rule of thumb, children should also indicate how many requests your site has to handle.

The servers for fpm should equal the number of CPUs available to the VPS.

The minimum servers should be round max CPUs – 1 or 2 depending on your VPS size, but never under 2.

MYSQL SERVER Optimization

Big Advanced Cookies

For the avg blogger/VPS enthusiast:

1. Figure out how many IOPS your server can perform
2. Figure out how much Memory you are willing to give the mysql instance anything below 386MB is to low. 
3. In my mysql.cnf file +/- some omitted:

innodb_io_capacity      = 70K 
innodb_io_capacity_max  = 80K #iops the server can take
key_buffer_size         = 256M
thread_stack            = 256K
thread_cache_size       = 513
innodb_log_file_size    = 128M
sort_buffer_size        = 
join_buffer_size        = 
read_buffer_size        = 
read_rnd_buffer_size    = 

To get the IOPS either ask your host or search a bit like usual.

https://www.alibabacloud.com/blog/how-to-use-fio-to-test-the-io-performance-of-ecs-local-ssd-and-essd-part-1_597783

nginx optimization

Big Advanced Cookies

For the avg blogger/VPS enthusiast:

In my sites-enabled server file:

ssl_session_cache shared:ssl:5M;
listen 41.76.110.143:443 ssl http2;
listen [2c0f:f850:dc05:ea57:1:9b67:0:1]:443 ssl http2;

in my general nginx config file:

events{
  worker_connections 1024;
  multi_accept on;
}


ssl_protocols TLSv1.2 TLSv1.3;

client_body_buffer_size 64K;
client_header_buffer_size
client_max_body_size
large_client_header_buffers
gzip
gzip_disable "msie6";

WP-Optimize And Pre-Load

When using a caching plugin, always ensure that Pre-Load is enabled. This will significantly improve site performance.

back-home


Posted

in

by

Tags:

Comments

Leave a Reply