← All articles
September 19, 2026

How to Fix PHP 8 'Extra Arguments Ignored' on Your Website Without Breaking Anything Else

You hired a developer two years ago to add a small feature — maybe a custom discount at checkout, or a special field in your contact form. It worked perfectly f

You hired a developer two years ago to add a small feature — maybe a custom discount at checkout, or a special field in your contact form. It worked perfectly for months. Then one morning you log in and see a strange warning across your WordPress dashboard: something about PHP, arguments, and the word "deprecated." A day later, a customer emails you saying the checkout page is blank. You didn't touch anything. What happened?

Almost every time, the cause is a PHP version upgrade on your hosting server — usually from PHP 7.4 to PHP 8. Hosting companies push these updates for security. The problem is that PHP 8 introduced stricter rules. One of those rules changed how functions handle extra arguments.

Think of PHP as the engine room of your website and a "function" as a worker on an assembly line. Every time that worker does a job, they accept a few pieces of information — those are called "arguments." Before PHP 8, if you handed a worker an extra box they didn't ask for, they silently ignored it and kept working. PHP 8 decided that's sloppy behavior. It now speaks up with a warning: extra arguments are no longer ignored silently. When the warning appears inside custom code tied to your orders or forms, the whole process can stall.

Why PHP 8 Stopped Ignoring Extra Arguments in User-Defined Functions

In programming, most functions in PHP are also documented in the PHP manual — including the ones your developer created, which are called user-defined functions. The PHP manual's page on user-defined functions used to tell developers that extra arguments were simply ignored. That phrase — "extra arguments ignored" — is now a warning in PHP 8 whenever a function receives something it wasn't designed to accept.

That's what the message on your screen means: a function on your site is being handed more information than it was written to handle. The warning itself isn't always deadly, but it's a red flag that your site is running code from the old era. Ignore it and problems compound. An outdated page builder, booking tool, or payment plugin can start throwing broken layouts, failed form submissions, and even a white screen at checkout.

Step 1: See the Warning Clearly

The quickest way to find the trouble is to install Query Monitor, a free WordPress plugin from the official plugin directory. Go to your WordPress admin, click Plugins → Add New, type "Query Monitor," and install it. Once active, a new "Query Monitor" item appears at the top of your admin toolbar. Click it, choose "PHP Errors," and you'll see a clean list of warnings. Look for anything containing "extra arguments" or "deprecated." Write down the file name and line number shown under the message. That file is where the problem lives.

If the warning only appears on your public pages, open your homepage in an incognito window. Right-click and select "View Page Source," then search for the words "extra arguments." The file name and line number will be right there next to the message.

Step 2: Find the Culprit — Plugin or Theme

Now isolate the offender.

Go to Plugins → Installed Plugins. Select all plugins, choose "Deactivate" from the dropdown, and apply. Then visit your site again. If the warning is gone, the problem is inside one of the plugins. Reactivate them one at a time, checking the site after each one. When the warning comes back, you found your suspect.

If the warning remains with all plugins off, your theme is the cause. Go to Appearance → Themes → Add New Theme, install "Twenty Twenty-Four" (or Twenty Twenty-Three), and activate it. If the warning disappears, your theme is the culprit.

Step 3: Update First — the Five-Minute Fix

Once you know which file owns the warning, try the easy route first. For a plugin: go to Plugins → Installed Plugins, find the specific plugin, and if an update is available, click update. Developers spent the last two years making their plugins PHP 8 compatible, and newer releases often already contain the fix.

For a theme: go to Appearance → Themes and check for an update notice. Click update if available. After updating, revisit the page. In many cases, the warning disappears on its own. Never skip this step before editing anything manually.

Step 4: The Real Fix When Nothing Has an Update

If the culprit is an abandoned plugin or an old custom theme, updating doesn't help. The fix is to teach the function to accept and ignore the extra argument properly.

First, make a backup. Go to cPanel from your hosting provider, open File Manager, right-click the whole public_html folder, and compress it into a zip file. Download that zip to your computer. This takes five minutes and protects your entire site.

Then navigate in File Manager to public_html > wp-content > themes (or plugins, depending on the file path from Step 1). Open the named folder, find the named file, and click Edit. Scroll to the line number from Step 1. You'll see a line that starts with the word "function," then a name with parentheses. Inside the parentheses is one word beginning with a dollar sign — that's the one argument the function accepts. PHP 8 is saying that something else on your site is passing two arguments to this function.

The fix is a tiny edit: inside those parentheses, after the existing dollar-sign word, type a comma, a space, a dollar sign, the word "extra" (or any made-up name), then an equals sign and the word null. In plain language, the line now announces: "this function accepts a first argument, plus an optional second argument that defaults to nothing." Save the file and refresh your site. The warning should be gone.

One caution: if the file belongs to an active plugin, your edit will be erased the next time that plugin updates. Long term, replace abandoned plugins with actively maintained alternatives that do the same job. And if editing files feels above your comfort level, don't force it — a wrong edit can crash your site. Just restore the backup you made and stop there.

If you've followed these steps and the warning is still there — or you'd rather not risk your checkout flow with a text editor — that's exactly when DevCev Digital can help. They'll locate the exact line, apply the fix, and confirm nothing else on your site breaks.

Need help with this?

DevCev Digital specialises in exactly this kind of work. Tell us what you need — we'll respond within a few hours.

Get free diagnostic →View all services
← Back to blogGot a project? Let's talk →