Website Without PHP
US
Menu

Common PHP Errors: What They Mean and Where to Start

Your site shows a message from 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., the language it runs on. Some messages are only advice and your site keeps working, others mean a page cannot load at all. The first job is to tell which kind you have, because that decides how urgent it is for your visitors and your business. The sections below help you decide.

A PHP error is a message from the PHP engine saying that something in the code or the setup did not work, and the type of message tells you how serious it is. Notices and warnings usually let the page keep loading, while fatal errors and parse errors stop it.

What the main error types mean

PHP groups its messages by severity. A notice is a mild hint about something sloppy, such as code that was valid in older PHP versions but is now flagged. A warning is stronger: something failed, such as a file that could not be opened, but the script carries on. A deprecatedA deprecation is an early warning that a feature still works today but will be removed in a future PHP version, so code using it must be changed in time. message says that a feature still works but is planned for removal. A fatal error stops the script immediately. A parse error, also called a syntax error, means PHP could not even read the code because of a typo, such as a missing semicolon or bracket.

Common causes

Most PHP errors come from a short list. Code written for an older 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. may run into changes in a newer one. A pluginA WordPress plugin is an add-on you install in WordPress to give your site extra features, such as contact forms, SEO tools or a webshop. or 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. can clash with another, or an update can finish only halfway. A file can be missing or have the wrong permissions. A script can run out of memory or time. A typo in edited code is the classic reason for a parse error.

How to check it safely

Before you change anything, 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. Then read the 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., because it names the error type, the file and the line number. A message on the screen can show the same, but on a live site it is better to keep it off the screen, since paths and details are visible to every visitor. Also check which PHP version the site runs, because many errors begin with a version change.

What you can try yourself

Keep the order simple. First, read the type and the file name in the log. Second, if the file belongs to a plugin or theme, deactivate it and see whether the error goes away. Third, if you edited code recently, undo that edit. Fourth, look for the exact message on its own page in this error hub, since each common message has its own causes and steps. Fifth, restore a backup if the site is still broken. Never share passwords with strangers.

When the PHP version is the cause

If the errors started after a PHP update, older code is the likely reason. Newer versions are stricter and remove old features, so messages such as deprecated notices can turn into fatal errors over time. The page on supported PHP versions on this site explains which versions the PHP project still maintains, so you know what to aim for.

When to get help

If you cannot find the file in the message, if the code is not yours, or if the site has to be back soon, bring in help. At Website Without PHP a human replies within 1 business day. A rush repair starts from $425, excluding VAT.

Frequently asked questions

Is a PHP error dangerous for my site?

Not always. Notices, warnings and deprecated messages usually leave the page working. Fatal errors and parse errors stop the page. Any message that visitors can see is worth removing from the screen, because it can reveal file paths on your server.

Where do I find the full PHP error message?

In the PHP error log. Most hostingWeb hosting is the service that keeps your website's files on a computer that is always online, so visitors can open your site at any time. panels have a section for error logs, and the file is often called error_log or php_errors.log. The guide on showing PHP errors in this hub explains how to read it without showing anything to visitors.

Can a PHP error checker find every problem?

No. A syntax check such as php -l only tells you whether PHP can read a file. It does not run the code, so it will not catch errors that appear while a page loads, such as a missing function or too little memory. The error log shows those.

Should I update PHP when I see errors?

Not in the middle of an outage. Fix the error first, then plan the update 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 with a backup ready. Running a PHP version that still receives security fixes matters, but changing the version during a breakdown adds a second unknown.

Related pages

Useful next steps

Related pages

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login. We keep the domain and the result, never your IP address.