Skip to content

06Web hosting & WordPress

Change the PHP version and php.ini settings

Switch your Nexthosting website's PHP version (8.2 to 8.5), change memory_limit and upload_max_filesize in the php.ini editor and read error logs.

In short

Every website has its own PHP version. You set it in the web panel for the website under Advanced → Developer tools → PHP version. PHP 8.2 to 8.5 are available, and the default is 8.4. In the same area, you use the php.ini editor to change values such as memory_limit or upload_max_filesize, and you find the PHP error log.

Version Recommendation
PHP 8.5 the newest version. Use it if your software explicitly supports it.
PHP 8.4 Default at Nexthosting, the safe choice for current WordPress and most CMSs.
PHP 8.3 for software that still has problems with 8.4.
PHP 8.2 only for older software that has not been adapted yet. Plan an update.

Older versions (7.x, 8.0, 8.1) are no longer offered because they receive no security updates. Which version your software needs is stated in its documentation; for WordPress see wordpress.org/about/requirements. Also check plugins and themes – they are usually the bottleneck.

Switching the PHP version safely
  1. Update plugins and theme
  2. Test on stagingset the new version on the copy
  3. Does everything run?
  4. Switch livesame version on the real site
  5. Check the error log
  1. In the web panel, open Websites and click the website.
  2. Choose Advanced at the top and then Developer tools.
  3. Scroll to PHP version and choose the version you want from the list.
  4. Confirm in the dialog with Update. The switch takes only a moment.
  5. Click through your site and take a look at the PHP error log.

All domains of a website use the same PHP version. If you need a different version for part of it, create a separate website for that.

The website takes over sensible defaults. You override individual values in the php.ini editor:

  1. Open the website in the web panel → Advanced → Developer tools.
  2. Scroll to the php.ini editor.
  3. In the directive field, enter the name, for example upload_max_filesize, choose Text as the type and enter the value, for example 128M.
  4. Confirm with Create. You can edit existing values.

Values that are already preset can be edited but not deleted.

Directive Used for Typical value
memory_limit Maximum memory per PHP request 256M for WordPress, 512M for large shops
upload_max_filesize Largest file that may be uploaded 64M to 256M
post_max_size Largest form transfer overall; must be at least as large as upload_max_filesize equal to or larger than upload_max_filesize
max_execution_time How long a script may run (seconds) 60 to 300 for imports
max_input_vars Number of form fields, e.g. for large menus or page builders 3000 to 5000
display_errors Show errors in the browser Off on live sites
date.timezone Time zone for PHP Europe/Berlin

You write sizes with M for megabytes, so 200M means 200 MB.

PHP writes errors and warnings to the file php-error.log. Here is how to find it:

  1. Open the website → Advanced → Developer tools.
  2. Find the PHP card and scroll to php-error.log.

The file is also in the website’s home folder and reachable via the file manager or SFTP. What typical messages mean:

Message Meaning
PHP Fatal error: Allowed memory size … exhausted memory_limit too small or a plugin needs too much
PHP Fatal error: Uncaught Error: Call to undefined function … Code does not suit the PHP version, or a missing extension
PHP Deprecated: … Warning that something will be removed in a future version – not an error yet
PHP Warning: … failed to open stream File missing or wrong permissions
Maximum execution time of 30 seconds exceeded Script runs too long; raise max_execution_time or split the task

The common extensions are already installed, including curl, gd (with WebP), imagick, intl, mbstring, zip, exif, sodium, bcmath, gmp, xsl, pdo_mysql, redis and the opcode cache opcache. With these, WordPress, WooCommerce, Joomla, Contao, Nextcloud apps and most frameworks run without extra work. If you are missing an extension, ask Support.

You can see which extensions are active via SSH with php -m or with a test file:

<?php phpinfo();

Put it in public_html as info.php, open it, and delete it immediately afterwards – it reveals many details about your website.

You also create recurring tasks (e.g. sending newsletters, imports, WordPress cron) under Advanced → Developer tools. Enter the schedule and the command, for example:

Terminal window
php ~/public_html/cron.php

For WordPress see Scheduled tasks.

Use the php.ini editor in the web panel. Values set there reliably apply to the whole website. php_value lines in .htaccess are not a recommended way and can even cause an error 500.

Do I have to restart anything after a change?

Section titled “Do I have to restart anything after a change?”

No. Changes usually take effect after a few moments. Reload the page and check the value with phpinfo() or in WordPress under Werkzeuge (Tools) → Website-Zustand (Site Health) → Bericht (Info) → Server.

Does Nexthosting switch my PHP version automatically?

Section titled “Does Nexthosting switch my PHP version automatically?”

No, you choose your website’s version yourself. Keep your software up to date so that switching to a newer version works without problems if an older one is ever no longer offered.