If you need to increaase WP Memory Limit, PHP Execution Time, PHP Max Input Vars, how can you do it in a wordpress site that is running on Yunohost server?
WP Memory Limit 256 MB
PHP Execution Time 120
PHP Max Input Vars 2000
1.Edit /etc/nginx/conf.d/YOURDOMAIN.tld.d/wordpress.conf
a. get root access through sudo
using sudo -i then type in the password
b. cd to `/etc/nginx/conf.d/wordpress.domain.d/
c. backup original file:
cp -a wordpress.conf wordpress.conf.backup
d. edit /etc/nginx/conf.d/wordpress.domain.d/wordpress.conf via command:
nano /etc/nginx/conf.d/YOURDOMAIN.tld.d/wordpress.conf
``
e. change the line client_max_body_size 30m to client_max_body_size INSERT VALUE.
For example,
client_max_body_size 150m;
under
location ~ [^/].php(/|$) {
fastcgi_read_timeout 300;
...
}
f. restart nginx with the following command:
yunohost service reload nginx
### 2.Edit `/etc/php8.2/fpm/pool.d/wordpress.conf`
a. if not already done, make yourself root or sudo
b. cd to /etc/php/INSERTPHPVERSIONNUMBER/fpm/pool.d/
For example, `/etc/php/8.2/fpm/pool.d/`
c. backup original file: `cp -a wordpress.conf wordpress.conf.backup`
d. edit /etc/php/INSERTPHPVERSIONNUMBER/fpm/pool.d/wordpress.conf via command:
`nano /etc/php/INSERTPHPVERSIONNUMBER/fpm/pool.d/wordpress.conf`
e. Make changes to following lines according to your need:
php_admin_value[upload_max_filesize] = 100M
php_admin_value[memory_limit] = 256M
php_admin_value[post_max_size] = 50M
php_admin_value[max_execution_time] = 120
php_admin_value[max_input_vars] = 20000
f. restart php with command: yunohost service restart phpVERSON-fpm For example,
yunohost service restart php8.2-fpm