WordPress Images Not Showing

Another odd problem I had when migrating a WordPress blog to a new server is that some images would not display. It wasn’t that no image were showing; only some did not display. I have not found the root cause, but a solution.

It turns out that something happened to the thumbnails, i.e. resized versions of images. The easiest solution was to force WordPress to regenetate them.

For this, I used the Regenerate Thumbnails plugin by Alex Mills. Make sure to disable the option “Skip regenerating existing correctly sized thumbnails (faster).

After the plugin completed, all images were showing correctly again.

WordPress Redirect Loop

I’m currently in the process of migrating WordPress to a new server, and I made a somewhat silly mistake.

Basically, after setting up my virtualhost, wordpress, etc I ran into a redirect loop, where the site would always redirect from the actual name of my blog (“example.com”) to a signup page, and the signup page would then redirect to itself.

I was at my wits’ end, so I enabled debugging by adding:

define('WP_DEBUG_LOG', true);

and changing this line to “true”:

define('WP_DEBUG', true);

This creates a logfile called “debug.log” in your wp-content subdirectory.And lo and behold, it turns out I had forgotten to actually import my MySQL data.

18-Nov-2018 10:07:46 UTC] WordPress database error Table 'wordpress.wp_blogs' doesn't exist for query SELECT blog_id FROM wp_blogs WHERE domain IN ( 'blog.example.net' ) AND path IN ( '/wp-signup.php/', '/' ) ORDER BY CHAR_LENGTH(path) DESC LIMIT 1 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, WP_Site_Query->;get_site_ids

I know how it happened – I redid my migration from scratch and took a break of a few days just before that step – and it’s unlikely someone else might run into this exact problem.

However, the steps to debug it are still valuable – had I done that in the first place, I might have saved myself quite a bit of time.

YouTube: Playback Stops with Spinning Loading Circle

For a couple of weeks I had a problem where YouTube playback stopped, and the video player would only display a spinning circle.
It turns out that this is a bug with the video player when Hardware Acceleration is enabled in Chrome (and possibly other browsers).

To turn off hardware acceleration, go to Menu –> Settings –> Advanced.

In the “System” section, find “Use hardware acceleration when available” and turn it off.

Seems to have fixed the problem for me so far, at the cost of higher CPU load.
U