Category: WordPress
-
Stopping WordPress User Registration Spam
Combatting the surge of user registration spam on WordPress, this guide introduces a code snippet to block registrations from specific email hostnames, offering an extra layer of protection against unwanted sign-ups.
-
Gathering database performance with WP-CLI
Discover how we employed WP-CLI to streamline the assessment of database server performance in WordPress, facilitating a more efficient profiling of SQL queries before and after crucial server upgrades.
-
Limiting Featured Image Dimensions in WordPress
As a follow up to my last post about limiting file sizes during uploads, I had to come back to the problem with limiting image sizes for featured images. Not bytes this time, but pixel dimensions. Still being a bit of a block editor newb, this was an interesting challenge for me, and I was…
-
Half Baked Idea: Limiting WordPress Image Upload Sizes
If you want to be able to limit images (or any attachments) from being uploaded into the media library if they are too large, you can use the wp_handle_upload_prefilter filter to do this. Below is a really basic example I whipped up in a few minutes that I shared with a customer not too long…
-
Quick Tip: Get Size of Revisions in WordPress
One thing that you might not think of when watching the size of a large WordPress site grow, is unnecessary data in the database. With the introduction of the block editor years ago, there has been a large increase in the number of revisions a post makes when being edited. This can create a lot…
-
Cool WordPress Plugins: Embed Extended
If you saw my last post, you may have noticed some cool embeds. These are coming from the Embed Extended plugin. This plugin takes OpenGraph data and treats it more like oEmbed data for WordPress. It works great with the block editor as well!
-
Quick Tip: Script Debugging in WordPress
If you’re debugging core WordPress scripts, one thing you might run into is dealing with cached copies of the script. Due to how script-loader.php enqueues the core files, their versions are “hard coded” and short of editing script-loader.php as well, there’s a way to fix this via a filter: This will apply a unique ver…
-
Quick Tip: Disable WordPress Block Editor Fullscreen Mode
I don’t know why, but any time I edit posts on this site, the block editor always goes into fullscreen mode. Even if I disable it, the next time I edit a post or refresh, it goes right back. My preferences aren’t being saved. Oh well, we can fix that with some PHP! Many thanks…