Improve WordPress Comments Load time when using Akismet: Adding an index to wp_comments

A customer of mine was seeing a 15 second load time on their WordPress site when clicking on “Comments”. I installed Query Monitor and saw that the Akismet plugin was running the following SQL command on each comment. SELECT COUNT(*) FROM wp_comments WHERE user_id = 1820 AND comment_approved = 1; This query was to show how many comments the user had previously … Read more

Searching WordPress MySQL Dump Files

From time to time, you’ll need to look at data within MySQL dump files, specifically I do it mostly with WordPress. There isn’t an easy way to search the dump unless you use grep. Here are some useful grep commands. Pull out a table. [enlighter linenumbers=”true”] grep ‘INSERT INTO `wp_bspr_users`’ dump.sql > /tmp/users.sql [/enlighter] Format … Read more

Remove iThemes Security Lockouts Script

I decided to create a command line PHP script that would list the current iThemes Security Logs and also allow you to remove them based on IP Address. Here is the script which I’ve called “ithemes-clearip.php” and it’s Github link, its dirty and really was made in like 15 minutes. https://github.com/jordantrizz/wordpress-scripts <? // List and … Read more

How to Disable the Displet Pop WordPress Plugin on Specific Pages

You won’t find much within the support forums in-regards to how to stop the Displet Pop plugin from loading on specific pages. However, I was able to find some pre-created code that does accomplish the task and just modified it for the Displet Pop plugin. function remove_displet_pop() { $ids = array(1358,1226); // ID’s of the … Read more

WordPress SEO plugin by Yoast

I recently installed the plugin Wordpres SEO by Yoast on my this blog, and others. It was recommended by one of those top 10-20-50 WordPress Plugin posts you find all over the place. You can read more about Yoast and their plugin on their website http://yoast.com/articles/wordpress-seo/ One of the features that comes in handy quite often … Read more

WordPress and Protecting Directories with .htaccess

You’ll find sometime that when you deploy WordPress in order for permalinks to work correctly you need a proper .htaccess file. This .htaccess also affects anything else you place within your web root when WordPress lives. For instance if you need to password protect a directory within the your webroot where WordPress lives. You’ll find … Read more

WordPress Permalink Sub-Directory 404 Error Weirdness

I didn’t really know what to put for the title of this post, but hopefully the content makes more sense and gets indexed properly and found by people looking for this specific information. The problem is when you install WordPress and setup Permalinks which uses a .htaccess file for Apache. The .htaccess make cause problems … Read more