# PHP Versions and Configuration

PHP Versions and Configuration – Web hosting and domain knowledge from NexoraHost.

**Quick answer:** Wrong PHP version can crash WordPress or shops. In Plesk PHP settings choose the right version (usually 8.1+).

PHP is the scripting language behind most websites and CMS like WordPress, Joomla or Drupal. This overview shows you the current PHP versions, their differences and how to configure them on your server.

**Note:** Detailed installation guides can be found in the articles in the left navigation.

## Current PHP Versions

    
        Version
        Status
        End of Life
        Recommendation
    

    
        PHP 8.3
        Latest stable version
        December 2027
        Recommended for new projects
    

    
        PHP 8.2
        Stable
        December 2026
        Good choice for existing projects
    

    
        PHP 8.1
        Security updates only
        December 2025
        Still usable, plan upgrade
    

    
        PHP 8.0
        End of Life
        November 2023
        Do not use anymore
    

    
        PHP 7.4
        End of Life
        November 2022
        Do not use – security risk
    

## Why is the right PHP version important?

    - **Security:** Old versions no longer receive security updates – your server becomes vulnerable
- **Performance:** Each new PHP version is faster. PHP 8.3 is up to 30% faster than PHP 7.4
- **Compatibility:** Outdated CMS versions don't run on new PHP – both must be current
- **Features:** New versions bring new functions and better error handling

## Switching PHP Versions

### On VPS/Root Server (Ubuntu/Debian)

`# Show available PHP versions
sudo apt search php | grep -E "^php[0-9]+\.[0-9]+"

# Install new version (example: PHP 8.3)
sudo apt install php8.3 php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-curl php8.3-zip -y

# Disable old version
sudo a2dismod php8.1  # For Apache
sudo a2enmod php8.3

# Restart web server
sudo systemctl restart apache2  # Apache
sudo systemctl restart nginx    # Nginx (with PHP-FPM)`

### On Webspace (Plesk)

    - Log in to Plesk
- Go to **Websites & Domains → PHP Settings**
- Select the desired PHP version from the dropdown menu
- Click **OK**
- The change takes effect immediately

## Important PHP Configuration Values (php.ini)

    
        Setting
        Recommended Value
        Meaning
    

    
        `memory_limit`
        128M – 256M
        Maximum RAM per PHP process. For WordPress with many plugins, 256M recommended
    

    
        `max_execution_time`
        30 – 120
        Maximum execution time in seconds. Increase for large uploads or imports
    

    
        `upload_max_filesize`
        16M – 128M
        Maximum file size for uploads. Increase for large media uploads
    

    
        `post_max_size`
        Slightly higher than upload_max_filesize
        Maximum size of POST data. Must be larger than upload_max_filesize
    

    
        `max_input_vars`
        1000 – 5000
        Number of allowed input variables. Increase for large menus or page builders
    

    
        `display_errors`
        On (Development) / Off (Production)
        Display errors directly. Always Off on live servers
    

## PHP-FPM – The Performance Booster

PHP-FPM (FastCGI Process Manager) processes PHP requests significantly faster than the old mod_php. Instead of starting a new process for each request, FPM keeps a pool of running processes ready.

`# Install PHP-FPM
sudo apt install php8.3-fpm -y

# Adjust pool configuration
sudo nano /etc/php/8.3/fpm/pool.d/www.conf

# Important settings:
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 8
pm.max_requests = 500

# Restart after changes
sudo systemctl restart php8.3-fpm`

## Enforce PHP Version for Specific Website

### Apache (via .htaccess)

`# Set PHP 8.3 via .htaccess
AddHandler application/x-httpd-php83 .php`

### Nginx (via server block)

`location ~ \.php$ {
    fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
}`

## Common Problems

**Website shows white page after PHP update:**

    - Check if all required PHP extensions are installed (`php -m`)
- Check the error log: `/var/log/php*-fpm.log` or `/var/log/apache2/error.log`
- Turn on `display_errors = On` for troubleshooting

**WordPress recommends outdated PHP version:**

    - WordPress itself runs on PHP 8.3 – the warning usually comes from old plugins or themes
- Update all plugins and themes
- Use a PHP compatibility plugin to find incompatible extensions

*Detailed installation and configuration guides can be found in the articles in the left navigation.*

## Related guides

    - [Set up webspace](/en/webspace/set-up)
- [Change nameservers – domain won't connect](/en/domain/nameserver)
- [DNS not working / propagation](/en/domain/dns-what-is-it)
- [Set up SSL correctly](/en/domain/ssl-einrichten)
- [SPF, DKIM & DMARC (email)](/en/domain/spf-dkim-dmarc)
- [Email with your domain](/en/webspace/mail)
- [Make website faster](/en/webspace/website-schneller-machen)
- [Domain & DNS hub](/en/domain)

*Order webspace: [nexorahost.com](https://nexorahost.com)*
