Bad bots exclusion via .htaccess

I found this floating around on the web so I can't take full credit for it but I have been adding to it. Options All -Indexes RewriteEngine on # Block Bad Bots & Scrapers SetEnvIfNoCase User-Agent “Aboundex” bad_bot SetEnvIfNoCase User-Agent...

Change Permissions or Ownership of Files or Directories Recursively

So I am always looking for the way to change all files or directories in a directory to a certain set of permissions.  Here are the following shell commands that you can use to accomplish it. # For Directories find ./ -type d -exec chmod 755 {} + # For Files find ./...

Changing The Site URL

So there are times that I go through needing to setup a dev environment and I find that I want to only have to edit the wp-config.php file as to the site's URL. This allows me to login to the admin area without having to worry about what is in the database for the...

Checking Active Processes

So this is a way to get a list of processes running for a specified user pstree -apu | grep username or ps aux | grep username    

Clean Up Orphaned postmeta Data

Sometimes you run into a time where you need to go into the database and delete items from the posts table.  So after doing this you could have a lot of extra data getting stored in the postmeta table that is no longer needed.  This is a simple MySQL command that can...