Currently browsing category: WordPress

Yoast irks me. Why i left them maybe a year or so ago in lieu of The SEO Framework. I have gists and a post about Yoast removing Yoast superfluous code — <article> tags — from the <head> of the site, sending Yoast meta box to the bottom of Dashboard editor pages. Yoast was like a needy child, always nagging about something. It was also slowing down my site with its bloat. I needed something simple. […]

Continue Reading …
WordPress

I ended up having 100s of crawl errors in Google Search Console for URLs that were ending in /blah.php and macariojames.com/dir/subdir/subdir2/blah.php for some reason. Some even ended in .html, which was easy to resolve since WordPress doesn’t use .html files, but .php files. After failing to write my own .htaccess RewriteRule and RewriteCond code, i found some useful code that i was able to tailor to fit my needs. I’ve shared it below. This code […]

Continue Reading …
PHP Server Configuration WordPress

Say you have JavaScript files that rely on images that live in your current theme directory — or elsewhere outside of the domain root — and they’re not loading without hard-coding the URL into your code. Or, you may be developing locally and when pushing to a sandbox or production server, tired of changing the file path depending on the server. You must register the script before calling wp_localize_script() then queueing it. This allows you to […]

Continue Reading …
JavaScript WordPress

For various reasons, i recommend installing WordPress (WP) in a sub-directory rather than in the default root of the domain — such as in the /public_html or /htdocs directories. From here on out, i’m going to reference the root directory as mysite.com/. If you already have a site installed at the root directory, perfect. This guide is exactly for that situation. If you do a fresh install, these can be adapted to it. Just follow […]

Continue Reading …
WordPress

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 […]

Continue Reading …
Software WordPress

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 […]

Continue Reading …
CLI WordPress

[Update: See bottom for screenshots] With the the privacy climate these days — see Facebook’s woes with Cambridge Analytica — Instagram has finally enforced the API changes and limits they announced in January. After riding dirty with the feeds for the past few months (despite the summertime deadline), two sites’ feeds stopped working last week. Crap. I needed a quick fix; something easy to implement, and preferably without having to use the API. Signing up again or […]

Continue Reading …
Social Media WordPress

I first learned of the functionality plugin vs functions.php way of thinking either from a StackOverflow comment while searching for some elusive WP answer or via Dave Clements’s posts: Create Functions Plugin and Putting Things Where They Belong. Not sure it matters, but i like to attribute inspiration. Anywhoo… The more i’ve tackled WordPress projects, especially while working in-parallel on a few projects or back-to-back with little time to rest, i’ve come to look for more efficient […]

Continue Reading …
Web Development WordPress

Looking for an easy WordPress backup solution, i decided to give several plugins a try. One of them was BackWPup. While testing it out, i ran into an issue trying to send backups via email. It was due to the DMARC policy on my domain. Below is an email i received (in Spam) when attempting to do the email backup option. Quick trick to circumvent this issue is to set the “From” address in the […]

Continue Reading …
WordPress

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 maybe being the culprit, but no one […]

Continue Reading …
WordPress

Scroll down for the code since i’m a little long-winded on this post. Ye’ve been warned. Yoast’s WordPress SEO plugin is awesome at getting you quickly setup with adding Twitter Cards and Facebook OpenGraph data to your website. But over the latest iterations it’s either added superfluous meta data or removed the options to toggle what is or isn’t shown (version 7.1 is a big culprit of it, which is currently running on this site, […]

Continue Reading …
WordPress

Some backstory: i’ve been developing several WordPress projects back-to-back or in parallel in the last few months, and once they’re ready to transfer from local dev environment to staging server, the content provided to me from clients or coworkers usually becomes stale, needing to be updated with increased frequency or in sporadic bulk edits, which would keep my local database annoyingly out of sync with the staging database. It was a clusterfuck — for lack […]

Continue Reading …
WordPress

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; […]

Continue Reading …
WordPress

So you installed WordPress in a sub-directory because you want your URL to still be simple, such as installed here www.mydomain.com/wordpress-installed-here/ yet visitors will see www.mydomain.com when navigating your site, but after doing so your blog posts and pages show up as a white blank page. Not good. Luckily, there’s a simple fix! Just update your .htaccess file in the main directory of where your site is located. I’ve put example code for the .htaccess […]

Continue Reading …
WordPress

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 […]

Continue Reading …
WordPress