WordPress Theme Breaks on PHP 8: What to Do
The design of your site (the themeA WordPress theme is a ready-made package that decides how your WordPress site looks and how its pages are laid out. Change the theme and the design changes.) does not work with the newer PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing., so pages can look broken, show warnings or go blank.
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
More about this
Visitors judge your business on how the site looks, so this is worth fixing quickly.
In most cases the answer is an updated theme or a small repair, not a new website.
When a WordPress theme breaks on PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. 8, it usually means the theme contains code that PHP 8 no longer accepts or handles differently from PHP 7. The site may show a white screen, a critical error message, missing sections or a pile of warnings. The fix is nearly always an updated theme or repaired theme code, not a change in WordPressWordPress is free software for building and editing a website in your browser. It is written in PHP, so it builds each page when someone visits. itself.
What the problem looks like
The symptoms depend on the theme. A fatal error in a core theme file, such as functions.php, can take down the whole site. A problem in a template file may only break one page type.
Warnings can also show up on screen or fill the log without stopping the page, which still tells you the theme needs work.
Common causes
PHP 8 removed some older functions and became stricter about others. Themes that were never updated since the PHP 7 era often use removed functions, pass the wrong type of value to a function, or rely on behaviour that PHP 8 changed. Themes that bundle old libraries, page builders or custom option frameworks are especially likely to run into trouble.
A child theme can also break because it copies code from an outdated parent theme.
How to check it safely
Take a backupA backup is a separate copy of your website's files and database, so you can bring the site back after a mistake, a hack or a failed update. of files and database first. Then read the PHP error logAn error log is a file where your website's software writes down what went wrong, with the time and place. It is the first thing to check when a site breaks., which names the theme file and line of the first problem. Check the theme's page or documentation for the PHP versions it supports and for the date of its last update.
Test on a stagingA staging environment is a private copy of your website where you try updates first, so any mistakes happen there and not on the live site. copy of the site if you have one, rather than switching versions on the live site. Do not share admin passwords while asking for help.
What you can try yourself
Try these steps in order. First, update the theme to its latest version, and update the parent theme if you use a child theme. Second, if the site is down, switch back to the earlier PHP version in your hosting control panelA hosting control panel, such as cPanel, Plesk or DirectAdmin, is the web page where you manage your domain, email, databases and PHP version. so visitors can use the site again.
Only switch back to a PHP version that still receives security fixes, keep it as short as possible, and check with your host that it includes the latest security release. Third, if you cannot reach the dashboard, rename the active theme folder through your file manager, so WordPress falls back to a default theme, and then look at the log again. Fourth, if the theme is no longer maintained, ask the author whether a PHP 8 version exists, or plan a move to a maintained theme.
Fifth, avoid editing theme files directly without a backup and a child theme, because an update would overwrite your edits.
When the PHP version is the cause
If the theme runs fine on an older PHP version and breaks on PHP 8, the theme is outdated for the version you want. Staying on an old PHP version is a short term workaround only, since the PHP project stops shipping security fixes for versions it no longer supports. Our page on supported PHP versions explains which versions the PHP project supports right now.
When to get help
If the theme is heavily customized, or the original author is gone, repairing or replacing it is work for someone who can read the code. A human at Website Without PHP replies within 1 working day. An emergency fix starts from £315, excluding VAT.