How to Fix WordPress Uncaught ArgumentCountError: array_merge()

How to Fix WordPress Uncaught ArgumentCountError: array_merge()

Is your WordPress site experiencing a serious error, and are you seeing this message when checking your error_log? Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters?

Usually, the Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters error in WordPress is caused by several issues, such as outdated plugins or themes, obsolete WordPress core files, and various other causes.

No need to worry, because this article will discuss several methods you can use to fix the Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters error on your WordPress site.

How to Fix WordPress Uncaught ArgumentCountError: array_merge()

To perform this fix, you need access to your hosting, or SSH if your published website is managed directly using SSH.

If you already have that access, you can try the following methods to fix the WordPress Uncaught ArgumentCountError: array_merge() error.

1. Update WordPress

The first step you need to take is to update WordPress, whether it is updating the WordPress core files, plugins, or themes that have updates available.

Since you cannot access your WordPress dashboard here, you need to perform a manual upgrade by following this tutorial: How to Manually Downgrade WordPress.

Although the method in that tutorial is for downgrading, you can also perform an upgrade by following the same steps and uploading the latest version of the WordPress core files.

Or, if you are using hosting that includes Softaculous you can perform a WordPress upgrade using Softaculous.

Cara Memperbaiki WordPress Uncaught ArgumentCountError array_merge - 1

2. Change PHP Version

The second method you can try is changing your PHP version.

The Uncaught ArgumentCountError: array_merge() error usually occurs when a website uses PHP 8.0 or higher, but the version of WordPress being used is not updated.

So, if you have difficulty performing a manual upgrade, you can change your PHP version. Typically, the stable PHP version used for WordPress is PHP 7.1.

Read: How to Change PHP Version in cPanel

Cara Memperbaiki WordPress Uncaught ArgumentCountError array_merge - 2

3. Disable Plugins

Just like with the WordPress upgrade, since you cannot access your website, you need to disable all plugins manually.

To do this, you can open the wp-content folder in your WordPress installation directory, then rename the plugins folder to something else. For example, to disable the Elementorplugin, you can rename the Elementor folder to Elementor-old.

Cara Memperbaiki WordPress Uncaught ArgumentCountError array_merge - 3

After renaming the plugin folder, you can then create a new empty folder named plugins, then try accessing your website again to see if the error is resolved.

4. Use a Default Theme

Besides disabling plugins, you can also use a default theme such as Twenty Twenty-Three

To do this, you can open the wp-content/themes folder in your WordPress installation directory, then rename your currently active theme. For example, if you are using the Nevetheme, you can rename the Neve folder to something else, for example Neve-old.

Cara Memperbaiki WordPress Uncaught ArgumentCountError array_merge - 4

Those are several methods you can use to fix your WordPress website if you are encountering the Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters.

If other ways to fix this error are found later, the tutorial will likely be updated directly on this page. So, make sure to bookmark the WPGan page to make it easier for you to manage and perform repairs if your WordPress website experiences errors.

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...