WP-CLI Error: PHP Deprecated: implode(): Passing glue string after array is deprecated.

I use WP-CLI to maintain my WordPress sites. It’s simple, it handy, and it works without any issues.

For example, I can updates all my plugins and themes (if updates are available) by executing wp theme update --all and wp plugin update --all. If WordPress core engine is available, I only need to run wp core update.

But there is a problem when I update WordPress plugins recently. Running wp plugin update --all to update all available plugin updates give me an error:

PHP Notice:  Trying to access array offset on value of type null in phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php on line 663
Notice: Trying to access array offset on value of type null in phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php on line 663

But, all updatable plugins were updated successfully. I tried to find the solutions, but I found nothing. I also try to use the nightly version via wp update --nightly, but still no luck.

Here are my wp --info

OS: Linux 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php7.4
PHP version: 7.4.3
php.ini used: /etc/php/7.4/cli/php.ini
MySQL binary: /usr/bin/mysql
MySQL version: mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /home/path/to/my/directory/
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.5.0-alpha-068c252

Adding Block Storage to an Existing Cloud at Linode

This site is hosted at Linode’s smallest package. Besides this blog, I have some other domains and small WordPress-based sites here. Most of them are not busy site. So, $5/mo is just gret. But, there is a small problem: storage.

Yesterday, I almost utilised 95% of the 25GB of storage limit. I was thinking of upgrading the to the higher specs. $10/mo is still a good deal. But, I only need the storage at this moment. Paying $10/mo will give me additional 25GB of storage.

I already knew that Linode also provides block storage, and I never looked up for this addons. So, I gave it try and tried to prove that the how-to works as written. So, from the panel, I chose to add 20GB of storage and follow the instruction in the input fields.

It took only less than a minute I think to create the disk storage.

Once the disk created, I only need to run some commands as instructed in the configuration page. It was that simple.

After that, I moved some of my files to the new partition, and changed some configurations. Also, I moved MySQL storage to this partition, because it utilises the most. the process also pretty straightforward.

And, I only need to pay extra $2/mo for 20GB additional storage.

Nice!

Upgrading to macOS Sierra

macOS Sierra

I love keeping everything updated on my Mac, from the operating system, and also the applications. I just updated to macOS Sierra — the latest operating system by Apple. I upgraded from OS X El Capitan. This post is posted after the upgrade.

Preparation

On my Mac, I installed all upgraded applications. Some applications already released the update to make them work with macOS Sierra. About my Mac, it’s 15″ MacBook Pro (Retina, Mid 2012) with 2.3 GHz Intel Core i7 processor and 8 GB 1600 MHz DDR3 of memory.

It’s highly recommended to backup everything. The simplest way is probably using Time Machine. But, I decided not to backup using Time Machine. I copied the important files to my external drive. It takes time, but having everything backed up is a good scenario.
Before hitting the download button, this was my setup:

Solution: OpenX Missing Statistic Reports

Yesterday, I was a little bit panic because I couldn’t found any statistic reports in an OpenX installation. I didn’t use the latest version (2.8.0). So, I did an upgrade to 2.8.5. But still, the statistics didn’t come back.
I finally found a solution at OpenX Community Forums. Here’s the trick:

  • Go to your database management tool. I’m using phpMyAdmin.
  • Run this simple query: update ox_application_variable set value = 1 where name ='admin_account_id';
  • Voila!

When I went back to the statistic page, I had all statistics available. Great.

Modifying WordPress custom database error connection page

Database connection has a big role when we build using a dynamic webpage. To be more spesific, if we’re using WordPress it’s always a good thing to have our database connection alive. But, for some technical situation, database connection might be dropped. Like or not, this is the situation we might have.
To deal with high-traffic website, there is a WordPress plugin (note: we’re talking about WordPress here) called WP Super Cache. This plugin will help your WordPress installation to deal with major traffic, to keep our site alive e.g. when our site got a massive traffic from site like Digg or Slashdot. When there is a failure on MySQL database connection, there will be a page presented informing about problem on establishing database connection. A page that we want to avoid. The worst thing is that when this ‘temporary’ page is indexed by search engines.

Migrating from b2 to WordPress 1.0.1

I tried to make a documentation about b2 Cafelog migration to WordPress 1.0.1.
First, do a standard pre-install actions. (Refer to WordPress Readme)

Now, this is what I did when migrating from b2 Cafelog to WordPress 1.0.1.