Categories
General

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

Categories
General

WordPress 3.7 with Background Updates

WordPress is actively being developed by great developers. I always tried to keep my WordPress installation updated by running update process — which is very easy. But, right now, I want to write down about the latest release. Not that every update provides an improvement, new features, or bug fixes, but this version 3.7 (codename: Basie) has few good things offered.
The first useful feature is the background updates. It means that you do not need to worry about having an outdated installation when a new release is available. So, if your self-hosted WordPress-powered blog is not yet upgraded to 3.7, it’s a perfect time.
WordPress 3.7 Updates
Having an automatic upgrade is good, it’s a worry-free situation. Of course, there might be some bugs or features that you will not be familiar with. But for me, having everything updated is a good thing. If you’re using some plugins, they might not compatible with the latest updates. Not always, but it might happen. Since I don’t have critical plugins installed, having some broken plugins should not be an issue. I just simply disabled them.

How to turn off automatic updates?

You can, but you have to maintain your updates. Or, if you don’t care about this updates (or worse, you don’t care about your blog), you can just ignore it. The easiest solution to disable the core updates is by modifying your wp-config.php file. It’s located at the main root directory. Add these following lines:

# Disables all core updates:
define( 'WP_AUTO_UPDATE_CORE', false );
# Enables all core updates, including minor and major:
define( 'WP_AUTO_UPDATE_CORE', true );
# Enables core updates for minor releases (default):
define( 'WP_AUTO_UPDATE_CORE', 'minor' );

If you want to for some details, go to Make WordPress Core website.
Some others features introduced in this updates includes the password strength checker. Do you always have a not-easy-to-guess password? The other one is about a better search. Since I’m maintaining some WordPress-powered sites, I think I will update them all right now.

Categories
General

Photon: WordPress.com's Content Delivery Network

Dealing with side loads for heavy-traffic website sometime can be painful. But, of course there are some common practice to deal with this kind of situation. For example, you can take advantage of cache system, offload to other service to reduce server load/bandwidth, or using CDN (Content Delivery Network).
For WordPress-powered sites, you can take advantage from its Jetpack. This free plugin offered lots of handy features to help you work with your WordPress installation. One of them is a featured called Photon.

Give your site a boost by loading images in posts from the WordPress.com content delivery network. We cache your images and serve them from our super-fast network, reducing the burden on your Web host with the click of a button.

That’s right. You should see some big hints there: content delivery network, cache, super-fast network. To activate this feature, just hit the “Activate” button, and you’re set. All your uploaded media files will be served using WordPress.com infrastructure. After having this feature activated, all image URLs in your posts will be modified. For example:

  • Original URL: http://domain.com/dotsios300.png
  • New URL: http://i2.wp.com/domain.com/dotsios300.png

If you are interested, here is an example of the image header served from WordPress.com network.

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: public, max-age=63115200
Content-Type: image/png
Date: Sun, 06 Oct 2013 17:06:28 GMT
Expires: Wed, 07 Oct 2015 05:06:26 GMT
Last-Modified: Sun, 06 Oct 2013 17:05:27 GMT
Server: ECS (sin/47C6)
X-Bytes-Saved: 8597
X-Cache: HIT
X-Content-Type-Options: nosniff
X-nc: HIT iad 90
Content-Length: 46456
Categories
General

Are you using WordPress' Post Formats feature?

If you have upgraded your WordPress installation to the latest version (right now, it’s Version 3.1), you can take advantage of its “Post Formats” feature. So, what is it anyway? WordPress Codex explains:

A Post Format is a piece of meta information that can be used by a theme to customize its presentation of a post. The Post Formats feature provides a standardized list of formats that are available to all themes that support the feature. Themes are not required to support every format on the list. New formats cannot be introduced by themes nor even plugins. The standardization of this list provides both compatibility between numerous themes and an avenue for external blogging tools to access to this feature in a consistent fashion. In short, with a theme that supports Post Formats, a blogger can change how each post looks by choosing a Post Format from a radio-button list.

This feature might be useful if you want to “format” your blog posts, especially when you want to have different output format from your WordPress theme. Just think about Tumblr service. Tumblr is very easy to use when you want to make a kind of item collections. Sometime you want to embed a video, post a link, make a regular blog post, or even embed an audio file. If you want to create a new post, you will have something like this:

Categories
General

Let's bring this blog back!

This blog goes nowhere. It’ still here, still up and running, but I realized that there is no single post in the last… (almost) two months. Not to make any excuses, but I think I was busy. I’m still updating my other blog, though.
Few days ago, when I was working on some WordPress-powered blogs, I found that there are some changes. I upgraded some blogs — including some installed plugins, and I also found problems. But, the problems had been solved anyway. I logged in to my dashboard, and run some upgrade processes. One of the problems I found was a WordPress plugin called “Jetpack”. Anyway, if you haven’t heard about Jetpack, here is a little bit detail:

Jetpack is a plugin that connects to WordPress.com and enables awesome features, powered by our cloud infrastructure.

There are already some features included, but I think I only use of: WordPress.com Stats. Previously, I have WordPress.com Stats plugin installed, after having my blog upgraded to Version 3.1, the statistic plugin stopped working and left this message: “Your WordPress.com account is not authorized to view the stats of this blog”. After searching some answers, most of the solutions mentioned about having Jetpack replaced WordPress.com Stats.
But, when I tried to activate Jetpack — by authenticating to  WordPress.com account — it didn’t run smoothly. I got this error:

Your Jetpack has a glitch. Something went wrong that’s never supposed to happen. Guess you’re just lucky: xml_rpc-32601Try connecting again.

I tried again and again. I searched for a solution and the problem was because I have a cache plugin installed. By the way, I use W3 Total Cache. So, I disabled the cache settings, sent an authentication request, and voila! Problem solved. If you find problem just like what I had, now you know the solution.
I also made some theme modification here. I removed some features I considered as “not-too-important”. More importantly, it’s a matter of having some articles posted here. Shoot!

Categories
General

Now, this blog is using DISQUS

I decided to switch the commenting system for this blog, from WordPress’ built-in commenting system feature to DISQUS. I was not sure which hosted service I wanted to use — DISQUS and Intense Debate came into consideration. Here are some reasons why I use external commenting system service right now:

  • DISQUS provides integration with other services like Twitter, Facebook and also OpenID. This features can be activated on WordPress-powered blogs using plugins. But, if DISQUS already has this feature, why not?
  • DISQUS also offers spam filter mechanism. I’m tired of spam. Akismet and TypePad Antispam plugin did a great job. Right now, I rely on DISQUS spam filter. And I have Akismet activated also.
  • I’m happy with how DISQUS display blog comments. Options can be managed directly from the dashboard.

The migration process was easy. It took less than 30 minutes to import all my comments (there were around 3,100 comments), and I got zero problem. It just worked.

Categories
General

How to Merge Two Blogs Using WordPress 3.0 Multi-Site Feature

Now, WordPress installation in this domain (orangescale.com) powers my other blog — in Bahasa Indonesia, using WordPress 3.0 Multi-Site feature. I decided to use this method so that I don’t have to manage two separated WordPress installation. In short: orangescale.com and thomas.or.id are now using a single WordPress installation, using orangescale.com as the primary blog.
This method works on my blog, but I don’t guarantee that you will have the exact process depending your own installation:

  • First, enable WordPress 3.0 Multi-Site feature
  • You should have access to modify domain DNS record. If your webhosting provider provide “Add-on domain” feature, it should work.
  • Create a new site under First Blog, you can use any address first.
  • Export contents from blog you want to move using WordPress export feature.
  • Import the export file you have to Second Blog.
  • Copy all media files from Second Blog to firstblog.com/wp-content/blogs.dir/files/X/ (Note: “X” is the Site ID).
  • Check all settings, escpecially the image locations in your posts. Later, the uploaded media files will use this path: seconddomain.com/files/path/to/image.jpg (the path might be different). If you have broken image path, check the settings and paths again.
  • Install WordPress MU Domain Mapping plugin. Follow the instruction. It’s easy.
  • Modify Second Blog DNS settings. Basically, you need to create an A record. Point your Second Blog domain to an IP address used by First Blog.
  • Check all plugins, blog settings, and permalink.
  • Enjoy!

I don’t know whether it’s an easy process or not, but here I want to show you that WordPress 3.0 Multi-Site feature can be useful. If you’re still comfortable to manage multiple blog installations, you don’t need to use this method.
It’s not a problem-free solution, of course. And it might be tricky sometimes. For example, about the plugin activation. Which plugins should be installed ‘globally’ or ‘locally’. Some plugins might work without any modifications. Here, I still have a plugin that does not work on my Second Blog. It works well on my primary blog, but not on the secondary. So far, I’m happy with the result.

Categories
General

Some Notes About Enabling Multi-Site option in WordPress 3.0

After upgrading my blog using WordPress 3.0, I was thinking of taking the opportunity to have the multi-site option. Previously, I played with WordPress Multi User. So, I think it would something I’m familiar with. If you’re not familiar with WordPress 3.0 features, you can check WordPress Codex first. You can find lots of useful information there. It’s a good place to start.
Currently, this blog is already using Multi-Site feature. The setup was easy, but I want to share few things I had during the ‘migration’. By default, this feature is disabled. So, you will see no settings/option under your WordPress Dashboard menus. If you’re ready to enable this feature, the first thing you need to do is to modify WordPress configuration file (wp-config.php). Add this line of code into wp-config.php:

define('WP_ALLOW_MULTISITE', true);
Categories
General

WordPress 3.0 Error: Briefly unavailable for scheduled maintenance

I have upgraded this blog to WordPress 3.0 not long after it was available for download. Everything went without any major issues. I only use it without special hacks. One thing that makes this version a little bit different is that WordPress will bring your site offline if there is/are something not working. For example, when you’re upgrading your plugins. WordPress will temporarily bring your site under maintenance mode.
If all process were completed, you should be happy. Otherwise, you will need to do some extra works. WordPress will display this kind of error message: “Briefly unavailable for scheduled maintenance.” You will be locked out from your admin area. Your website will be inaccessible. Solution? Easy. You need to go to login to your webhosting server, and remove .maintenance file. You can find it in your blog folder — the same location with your wp-config.php.

Categories
General

Automatic WordPress Backup (to Amazon S3)

Today, I tried another WordPress plugin called “Automatic WordPress Backup”. This plugin will help blog owners to create backup remotely to Amazon S3 service. Since I’m using it and pretty satisfied with the billing usage, I installed it at some WordPress-powered blogs I maintain.
I use one of the available buckets under my account. For this bucket, I set its ACL (Access Control List) to private, of course. After this plugin installed and activated, I only needed to put my Access Key ID and Secret Access Key.
I decided not to include all files for my backup. I only need the database and uploaded contents. After the settings were saved, I simply hit the backup button. The process depends on the disk and database usage. I found that it was pretty fast. One of my backup files was around 300 MB, and it only took less than 5 minutes to complete the process. Also, the backup file was compressed. This should be useful to cut the usage process as you only need to store a single file for each backup.
The backup files will be automatically delivered to my Amazon S3 bucket and when the process completed, I can see the backup history. To download the backup, I only need to click on the backup links.
The backup links are built using pre-signed URLs so that only the account holder (or someone who knows the URLs) can download them.

Categories
General

Unable to locate WordPress Plugin directory

I just made a fresh install of WordPress 2.8. As usual, the installatoin process was simple and straight forward. After doing some configurations, I wanted to install some plugins directly using the automatic installer from dashboard. But, I had a problem.
After filling in the FTP information, my WordPress gave me this message:

Unable to locate WordPress Plugin directory

I have no idea about this error. I never got this kind of error. What’s wrong? It seems that some users also found this problem. There’s also an interesting discussion about this. Is it WordPress’ bug? Or, is it related to server configuration? Anyone got this problem too?

Categories
General

WordPress Plugins Search and Comment Threading

Finally, WordPress now offers a better search engine for its plugin directory. It is using Sphinx right now. But, it does not search plugins by authors and tags. It only reads all information from readme.txt file which is delivered in every plugins uploaded to directory.

Another improvement — well, I think I should call it “feature” — is that WordPress.com is now supporting comment threading feature. This feature is included in the core if you’re using self-hosted WordPress 2.7.1. Since WordPress.com seems already upgrade to the latest version, we can now use this feature also. Just go to Settings and choose Discussion from your WordPress.com dashboard.

Categories
General

Troubleshooting: Can't Login After WordPress Upgrade

Today, I was helping my client upgrading her WordPress-powered blog. He was using WordPress 2.6.x series. I upgraded using the standard procedur, and I thought the whole process was painless. But, it was not. I could not access its “Dashboard”. The login screen was there, but when I entered the username and password — I was 1,000% sure that I typed a correct combination — nothing happened.

Few months ago, I had a problem with the “Redirect Loop”. I made a speculation: removing all plugins under wp-content/plugins/ directory. Of course, after I made sure that I had the list of all active plugins. After that, I tried to login again, and voila! I continued re-installing all plugins needed. Problem solved.

Categories
General

About Facebook Connect for WordPress

I installed Facebook Connect as an experiment for this blog last week. With some modifications, it works fine here. If you’re using WordPress and want to try Facebook Connect, here are few things you might need to know. Anyway, I’m using Facebook Connect 0.9.9 plugins for WordPress. It’s recommended to use the latest version. When I write this post, the newest version is 1.0.
When Facebook users are “connected” to your blog, it means:

  • They will be registered to your blog as “Subscriber” in your WordPress system. Some account information — from Facebook — will be inserted. They are “Full name” and Facebook Profile ID.
  • The usernames will be a combination of FB_ prefix with profile ID. So, you will have usernames like these: FB_1015647304, FB_1226611178, FB_678048415, etc.
  • The “Website” field will be their Facebook profile page.
  • Biographical Info will be derived from Facebook profile based on the data at the time they’re connected.
  • Email address will not be inserted as user profile data. Connected users can edit their profile (edit display name, email address, website URL, etc) by signing in to your WordPress Dashboard. This will make them supply their email addresses.
  • Facebook profile images will be used as avatars.

Right now, I have some questions (for myself) about this Facebook Connector plugin.

  • Can they “disconnect” from my blog? I don’t see an option for this. The only thing I can do to “disconnect” them from my blog is by deleting their account in my WordPress system.
  • Some Facebook users have been connected. And then, what? What’s the benefit of being “connected”? I know, it’s like creating a small community for a blog. But, what’s the other benefit?

I will leave Facebook Connect here for now. But, I’m thinking of removing it later. Anyway, Facebook Connector is not a bad plugin. It’s great piece of plugin to make connection between your WordPress-powered blog and Facebook.