Skip to main content

Configure PHP settings for Joomla 6

28 October, 2026

Recommended PHP configuration settings for Joomla 6

Joomla PHP Warnings 

When you first install Joomla you might get these warnings about PHP settings. In this guide, we will configure the recommended PHP settings for Joomla 6 and also change some PHP settings to improve security. This guide was written for Caddy web server with PHP 8.5 running on Debian 13 Linux. I've also included some info for Nginx and Apache

The PHP temporary folder is not set

This folder is the folder that PHP uses to store an uploaded file before Joomla can access this file. Whilst the folder not being set isn't always a problem, if you are having issues with manifest files not being detected or uploaded files not being detected, setting in your php.ini file might fix the issue.

Small PHP maximum POST size

This is the maximum amount of data that can be sent via POST to the server. This includes form submissions for articles, media (images, videos) and extensions. This value is less than 16MB which may impact on uploading large extensions. This is set in the php.ini under post_max_size.

Maximum PHP file upload size is too small

The maximum file size for uploads is set to less than 16MB which may impact on uploading large extensions. This is set in php.ini in both the upload-max-filesize and post_max_size settings of your PHP settings (located in php.ini and/or .htaccess file). The value of post_max-size must be greater than the value of upload_max-filesize.

Check PHP version

Before we begin, check the installed PHP version and update it if needed

For Joomla 6, PHP 8.4 is recommended

php -v

php v2

Find PHP configuration file

Find the PHP configuration file php.ini

php-fpm8.5 -i | grep "Loaded Configuration File"

 php.ini configuration file for FPM (Nginx and Caddy)
/etc/php/8.5/fpm/php.ini

For Apache the php.ini configuration file will be
/etc/php/8.5/apache2/php.ini

 php loaded config file

Create PHP log folder

For Caddy we'll need to create a folder for PHP error logs. Nginx and Apache will use the web servers error.log for any PHP error messages

# create log folder and set owner to www user
mkdir -p /var/log/php
chown www-data:www-data /var/log/php

# check fpm error log
php-fpm8.5 -i | grep error_log

# check last 10 entries in log
tail -10 /var/log/php/php-error.log

PHP settings for Joomla

Recommended PHP settings for Joomla 6 

 Disable dangerous PHP functions

 In the php.ini file we'll disable the following dangerous PHP functions

 

disable_functions = show_source, highlight_file, system, shell_exec, passthru, exec, pcntl_exec, phpinfo, popen, proc_open, posix_kill, dl

  

 Edit php.ini config file

Edit FPM php.ini configuration file and change the following settings

nano /etc/php/8.5/fpm/php.ini

php.ini

; Language Options
output_buffering = off
open_basedir = /var/www/your.website.com/html:/tmp:/var/www/backups
disable_functions = show_source, highlight_file, system, shell_exec, passthru, exec, pcntl_exec, phpinfo, popen, proc_open, posix_kill, dl

; Miscellaneous
expose_php = Off

; Resource Limits
max_execution_time = 30
memory_limit = 256M

; Error handling and logging
display_errors = Off
log_errors = On
error_log = /var/log/php/php-error.log

; Data Handling
post_max_size = 40M

; File Uploads
upload_tmp_dir = /tmp
upload_max_filesize = 40M

; Fopen wrappers
allow_url_include = Off

[Session]
session.use_strict_mode = On
session.cookie_httponly = On
session.cookie_samesite = Lax

Restart PHP FPM

service php8.5-fpm restart

Restart Nginx

If you are using Nginx

service nginx restart

Restart Caddy

If you are using caddy

service caddy restart

 Joomla System Dashboard warnings have cleared

warnings cleared