
CWP issue wp-admin not working and VPS faster
- or -
Post a project like this57
£150(approx. $199)
- Posted:
- Proposals: 5
- Remote
- #4406473
- OPPORTUNITY
- Awarded
Description
Experience Level: Entry
I have made a change in the Functions.ini file, and now I am struggling to access the server. I think it needs tweaking, but the file explorer isn't working.
I would also like the server to be faster, we need a number of companies for scanning to email and a couple of websites, and I feel the server can work faster than what it is. Chatgpt has suggested the following changes to get more from the server and speed it up but I want someone who knows what they're doing to fix it and make it better.
Please state your availability as if you can do it today that would be great thanks.
1. PHP‑FPM Pool Sizing (/etc/php-fpm.d/www.conf)
Decide how much RAM to reserve for PHP‑FPM (e.g. 3 GB). Measure average memory per FPM child:
bash
Copy
Edit
ps --no-headers -o rss,cmd -C php-fpm | awk '{ sum+=$1 } END { print sum/NR/1024 " MB per process" }'
Then:
ini
Copy
Edit
; Reserve ~3 GB for PHP‑FPM
pm = dynamic
; max_children ≃ 3000 MB ÷ (MB per process)
pm.max_children = 75
pm.start_servers = 15
pm.min_spare_servers = 15
pm.max_spare_servers = 30
request_terminate_timeout = 120s
listen = /run/php-fpm/php81.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
2. OPcache & Realpath Cache (php.ini)
Reserve 512 MB for OPcache, speed up file lookups:
ini
Copy
Edit
opcache.enable = 1
opcache.memory_consumption = 512
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.validate_timestamps = 0 ; (disable in prod)
realpath_cache_size = 16M
realpath_cache_ttl = 7200
3. MySQL InnoDB Buffer Pool (/etc/my.cnf under [mysqld])
Give MySQL 5 GB for caching data/indexes:
ini
Copy
Edit
innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
4. Redis Object Cache (if used)
Allocate 1 GB for Redis:
conf
Copy
Edit
# /etc/redis.conf
maxmemory 1gb
maxmemory-policy allkeys-lru
And point WP to it via your Redis plugin.
5. OS Virtual Memory & File Limits (/etc/sysctl.conf)
Tweak swap behavior & dirty writes:
bash
Copy
Edit
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
fs.file-max = 2097152
Then sysctl -p.
Also raise ulimits for web server/PHP:
bash
Copy
Edit
# /etc/security/limits.conf
nginx soft nofile 100000
nginx hard nofile 200000
php-fpm soft nofile 100000
6. Nginx Worker Processes (/etc/nginx/nginx.conf)
Match workers to CPU cores (e.g. 4 cores) and allow many connections:
nginx
Copy
Edit
worker_processes auto;
worker_rlimit_nofile 200000;
events {
worker_connections 10240;
multi_accept on;
}
Also this: 1. Nginx: One Worker per Core
In /etc/nginx/nginx.conf:
nginx
Copy
Edit
worker_processes 8; # one process per core
worker_rlimit_nofile 200000;
events {
worker_connections 10240; # high enough for your load
multi_accept on;
}
2. PHP‑FPM: Balance Memory & CPU
Keep your FPM pool sized by RAM, but shape the spare and start counts around your cores:
ini
Copy
Edit
pm = dynamic
pm.max_children = 75 ; ≃(3 GB ÷ ~40 MB per child)
pm.start_servers = 8 ; spawn one per core
pm.min_spare_servers = 4 ; half your cores
pm.max_spare_servers = 16 ; two cores’ worth extra
pm.max_requests = 500 ; recycle to avoid leaks
request_terminate_timeout = 120s
listen = /run/php-fpm/php81.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
3. MySQL / InnoDB: Parallel I/O
In your [mysqld] section (/etc/my.cnf):
ini
Copy
Edit
innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
innodb_read_io_threads = 8 ; match your cores
innodb_write_io_threads = 8
innodb_thread_concurrency = 0 ; auto-manage with > 8 CPUs
4. Redis (if used): Threaded I/O
In /etc/redis.conf:
conf
Copy
Edit
# For Redis 6+ with I/O threads compiled in:
io-threads 4 ; delegate networking to 4 threads
io-threads-do-reads yes
maxmemory 1gb
maxmemory-policy allkeys-lru
5. OS Tuning: Scheduler & IRQ
Add to /etc/sysctl.conf:
bash
Copy
Edit
# Network & file descriptors…
fs.file-max = 2097152
# CPU scheduler: prefer throughput on SMP
kernel.sched_migration_cost_ns = 5000000
# Swappiness & dirty writeback
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio= 5
Then sysctl -p.
Enable irqbalance so interrupts are spread across all cores:
bash
Copy
Edit
systemctl enable irqbalance
systemctl start irqbalance
I would also like the server to be faster, we need a number of companies for scanning to email and a couple of websites, and I feel the server can work faster than what it is. Chatgpt has suggested the following changes to get more from the server and speed it up but I want someone who knows what they're doing to fix it and make it better.
Please state your availability as if you can do it today that would be great thanks.
1. PHP‑FPM Pool Sizing (/etc/php-fpm.d/www.conf)
Decide how much RAM to reserve for PHP‑FPM (e.g. 3 GB). Measure average memory per FPM child:
bash
Copy
Edit
ps --no-headers -o rss,cmd -C php-fpm | awk '{ sum+=$1 } END { print sum/NR/1024 " MB per process" }'
Then:
ini
Copy
Edit
; Reserve ~3 GB for PHP‑FPM
pm = dynamic
; max_children ≃ 3000 MB ÷ (MB per process)
pm.max_children = 75
pm.start_servers = 15
pm.min_spare_servers = 15
pm.max_spare_servers = 30
request_terminate_timeout = 120s
listen = /run/php-fpm/php81.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
2. OPcache & Realpath Cache (php.ini)
Reserve 512 MB for OPcache, speed up file lookups:
ini
Copy
Edit
opcache.enable = 1
opcache.memory_consumption = 512
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.validate_timestamps = 0 ; (disable in prod)
realpath_cache_size = 16M
realpath_cache_ttl = 7200
3. MySQL InnoDB Buffer Pool (/etc/my.cnf under [mysqld])
Give MySQL 5 GB for caching data/indexes:
ini
Copy
Edit
innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
4. Redis Object Cache (if used)
Allocate 1 GB for Redis:
conf
Copy
Edit
# /etc/redis.conf
maxmemory 1gb
maxmemory-policy allkeys-lru
And point WP to it via your Redis plugin.
5. OS Virtual Memory & File Limits (/etc/sysctl.conf)
Tweak swap behavior & dirty writes:
bash
Copy
Edit
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
fs.file-max = 2097152
Then sysctl -p.
Also raise ulimits for web server/PHP:
bash
Copy
Edit
# /etc/security/limits.conf
nginx soft nofile 100000
nginx hard nofile 200000
php-fpm soft nofile 100000
6. Nginx Worker Processes (/etc/nginx/nginx.conf)
Match workers to CPU cores (e.g. 4 cores) and allow many connections:
nginx
Copy
Edit
worker_processes auto;
worker_rlimit_nofile 200000;
events {
worker_connections 10240;
multi_accept on;
}
Also this: 1. Nginx: One Worker per Core
In /etc/nginx/nginx.conf:
nginx
Copy
Edit
worker_processes 8; # one process per core
worker_rlimit_nofile 200000;
events {
worker_connections 10240; # high enough for your load
multi_accept on;
}
2. PHP‑FPM: Balance Memory & CPU
Keep your FPM pool sized by RAM, but shape the spare and start counts around your cores:
ini
Copy
Edit
pm = dynamic
pm.max_children = 75 ; ≃(3 GB ÷ ~40 MB per child)
pm.start_servers = 8 ; spawn one per core
pm.min_spare_servers = 4 ; half your cores
pm.max_spare_servers = 16 ; two cores’ worth extra
pm.max_requests = 500 ; recycle to avoid leaks
request_terminate_timeout = 120s
listen = /run/php-fpm/php81.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
3. MySQL / InnoDB: Parallel I/O
In your [mysqld] section (/etc/my.cnf):
ini
Copy
Edit
innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
innodb_read_io_threads = 8 ; match your cores
innodb_write_io_threads = 8
innodb_thread_concurrency = 0 ; auto-manage with > 8 CPUs
4. Redis (if used): Threaded I/O
In /etc/redis.conf:
conf
Copy
Edit
# For Redis 6+ with I/O threads compiled in:
io-threads 4 ; delegate networking to 4 threads
io-threads-do-reads yes
maxmemory 1gb
maxmemory-policy allkeys-lru
5. OS Tuning: Scheduler & IRQ
Add to /etc/sysctl.conf:
bash
Copy
Edit
# Network & file descriptors…
fs.file-max = 2097152
# CPU scheduler: prefer throughput on SMP
kernel.sched_migration_cost_ns = 5000000
# Swappiness & dirty writeback
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio= 5
Then sysctl -p.
Enable irqbalance so interrupts are spread across all cores:
bash
Copy
Edit
systemctl enable irqbalance
systemctl start irqbalance

Projects Completed
103
Freelancers worked with
56
Projects awarded
18%
Last project
22 Sep 2025
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Could you confirm if you have server backups available before we proceed with these optimizations?
-
Can you share how you're currently accessing the server (SSH, cPanel, etc.) and whether you have backup access to the original Functions.ini file or server logs? I can start troubleshooting right away once I know this
11356121135608
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies