Troubleshooting My WordPress Installation

File Size exceeds the upload_max_filesize

Users working on new installation of WordPress instances may run into this challenge when they are either trying to upload a theme or plugin or a media file for that matter. This can be easily resolved by changing values in the php.ini file which in typical installation of apache2 would be in the /etc/php/8.3/apache2/ file directory

Open up php.ini using nano,

nano php.ini

Look for “upload_max_filesize” and change the value to a bigger value as per your circumstances. Save and reload Apache

systemctl restart apache2

WordPress asking for FTP/SFTP permission when you try to update/delete plugins

This happens when the WordPress installation is not owned by www-data. Navigate to the folder that has your WordPress installation (example /var/www/goonie/)

chown -R www-data:www-data /var/www/goonie/

Reload your WordPress page and your issue should be resolved.

What are the minimal php modules we need to install for a standard instance of WordPress

We can install the following php modules, where x is the current version of php being installed in your instance

sudo apt install php8.x-fpm -y
sudo apt install php-mysqli -y
sudo apt install php-mbstring -y
sudo apt install php-xml -y
sudo apt install php-zip -y
sudo apt install php-gd -y
sudo apt install php-curl -y

You will then need to enable the modules

sudo systemctl enable php8.1-fpm
sudo systemctl status php8.1-fpm

Restart Apachee for good measure

sudo systemctl restart apache2

«
»

Leave a Reply