Table of Contents
Solutions
- Method #1: PHP.ini edit (best results)
- Method #2: .Htaccess edit (Did not work)
Method #1
Today, a client of mine using my favorite host SiteGround ran into the following issue. They had a error message suddenly showing on their home page that wasn’t there before. It was something like this (though I’ve changed it for their privacy):
Warning: array_merge(): Argument #2 is not an array in /home/anotherfolder/public_html/example.org/wp-includes/load.php on line 63
I found a lot of people on the WordPress forums who seemed to have the same issue—same file and line number—in the past few months.
There are almost certainly multiple causes of this error, but here’s what worked for me.
The website had previously been on Bluehost before moving to SiteGround. Whoever moved the site left behind a php.ini
file in the “root” website directory with some special server rules regarding server memory and timeouts.
Renaming the php.ini
file in the “root” directory of the site fixed the issue.
More specifically, php.ini
is a special configuration file for servers. I wanted to test removing it without risking problems I couldn’t undo, so I simply renamed it to php.ini.BCK
(short for “backup”). I then refreshed the page, and *poof*, my errors disappeared. Happy client! If that change broke the site, I could have just named the file back to php.ini
and looked for a different fix.
Moving sites to SiteGround has been one of the best ways I’ve found to increase site speed because they use modern technology and have a greatcustom caching tool. Whatever problems this old file was trying to solve, SiteGround didn’t have! You can read more about why I recommend SiteGround and recommend it on Nonprofit WP if you’re looking for a new website host to speed up your site.
This post contains affiliate links to SiteGround which is where I host all my own sites. 🙂
Method #2:
Once your script runs, it’s too late to not cache the file. You need to set it outside PHP:
- If PHP runs as Apache module, use an
.htaccess
file:php_flag opcache.enable Off
- If PHP runs as CGI/FastCGI, use a
.user.ini
file:opcache.enable=0
And, in any case, you can use good old system-wide php.ini
if you have access to it.
Resources:
Method1 -https://mrwweb.com/solving-array_merge-argument-2-on-load-php-line-63-on-siteground/
Method2: https://wordpress.org/support/topic/warning-array_merge-argument-2-is-not-an-array-in-load-php-on-lin-63/