Categories
CLI WordPress

WordPress: Fix WP-CLI error with sed or find commands

One suggested solution was to install the GNU version of the sed command — npm install gnu-sed — but i eventually found a command-line solution once adapted to my situation that worked.

Categories
Software WordPress

Local by Flywheel hangs on “Checking System…” (macOS)

Local by Flywheel was running without a hitch for the 30 minutes after i initially installed it, setup a local site, and tried out various settings. I was working on a new post regarding local WordPress development using the app. It’s part of a series i’m writing on local development environments and workflows. While documenting the steps and time it takes to close and restart Local with a site running, i ran into an issue with …

Categories
Miscellaneous

Grayed out Apple ID when updating App Store applications

Updating an app installed on a Mac by an account you don’t have the password for, here’s how to bypass the grayed out Apple ID prompt: Go to the /Applications folder: Finder –> Applications Right-click the app that needs updating — in my case, XCode Click Show Package Contents Go into the Contents folder Now go into into the _MASReceipt folder. Delete/Move to Trash the receipt file (you may be prompted for a local administrator …

Categories
CLI WordPress

WordPress WP-CLI PHP Notice: Undefined index: HTTP_HOST

I manage a ton of websites. Some servers house several separate installations, which makes it cumbersome to have to login through the web to manage each site. (No multi-site setups.) I decided last weekend after attending my third WordCamp ATL (#WCATL), i’d start to actually utilize wp-cli on a daily basis now that it’s matured and powerful. Heck, i even thought about writing an ebook on using wp-cli. Stay tuned. Anyway, to the issue at …

Categories
CLI Security Server Configuration Web Development

Apache + LetsEncrypt file ‘/etc/letsencrypt/live/…/fullchain.pem’ does not exist or is empty. Action ‘configtest’ failed.

I had setup a new Apache server and needed an SSL certificate so i went with the tried and true, quick and easy LetsEncrypt/certbot route. While testing if gzip was installed, i received errors running apachectl configtest. First time receiving this error. It seemed to be caused by the LetsEncrypt install. I probably wouldn’t have noticed it for quite some time since the https:// version of the site i just put up on the new …

Categories
CLI PHP Server Configuration

Machform PHP mail / sendmail issues on Apache and nginx

So, i decided to give Machform a spin on a project i was working on. Figured it would be quick and easy to get up and running. It was — locally — but when deploying to my sandbox/staging server, i ran into issues with sending notification emails. It was maddening. Spent a couple of days getting everything working as needed and on the same page for all three differing environments. The first problem occurred when …

Categories
WordPress

WordPress Custom Shortcode Not Displaying or Breaks Page

So, i’m working locally on this site, tweaking my Wikipedia User Contributions Display plugin, and i noticed that some tweaks i pushed live are actually working fine, but locally they’re not (kinda backwards, i know). Heck, anything after the plugin shortcode doesn’t display–it actually breaks the site (footer scripts and other code fails to run). I google for some fix but nothing concrete. I spot something about PHP may be the culprit, but no one …

Categories
Uncategorized

JSON-LD missing ‘}’ – Google Structured Data Testing Tool

So, you’re implementing structured data on your site, particularly using JSON-LD (the latest Google recommendation regarding structured data), but when testing the file or the code used via the Structured Data Testing Tool, you receive an error–particularly this: JSON-LD Missing ‘}’ or object member name. Fortunately, it has a pesky but quick fix. All you have to do is look for the superfluous trailing comma(s) throughout your code. For instance, in the image below, you’ll …

Categories
WordPress

WordPress FTP Error when upgrading WordPress core or plugin

You go to update a plugin or the latest security patch for WordPress, but when you click update you’re prompted for FTP credentials. It can be frustrating and annoying, but it has (typically) a simple fix. This WordPress FTP error is frustration at its peak. You’ll need access to your wp-config.php file and ssh access to your server.  Two steps: Apache server — via terminal/command line run sudo chown -Rf www-data:www-data /var/www/html (or could just be /var/www; …

Categories
CLI

brew update – Error: /usr/local must be writable!

[UPDATE – View updated solution at the bottom of the post.] So, you wanted to update homebrew with the command brew update but received a similar error below: Error: /usr/local must be writable! Simple fix is to run sudo chown -R $(whoami) /usr/local Your problem should now be fixed. If not, you might have ran into this issue that i’ve come across, too: Error: update-report should not be called directly! I fixed this by running …

Categories
Server Configuration Web Development

MySQL Server Not Starting on MAMP for Mac

So if you’re like me, you do a lot of WordPress development locally and experience annoying issues. I use MAMP, personally, as do many others. One of these common headaches is the MySQL server not starting on MAMP for Mac; inexplicably stopping and whatever you try, it won’t start again. Here’s a fix that has worked all the time for me: Quit MAMP. In the Finder (or Terminal) go to Applications/MAMP/db/mysql56/ and delete the last log …

Categories
WordPress

WordPress unknown character set utf8mb4 error

How to fix this “WordPress database error: [Unknown character set: ‘utf8mb4’] ~” error. Simply change “utf8mb4” to “utf8” in the Database Charset setting in your wp-config.php file. Voila. Update (2018.02.01): Do NOT follow any of that above. You’re going to want to keep the ‘utf8mb4’ under Database Charset in your wp-config.php file, but you’ll need to upgrade your WordPress database. You can do so by navigating here YOUR_WP_INSTALL_FOLDER/wp-admin/includes/upgrade.php. For reasons why, read this from WordPress …