Debug Pending Updates

This function can be used to help find what needs to be updated in WordPress when the backend will not tell you. <?php /** * Debug Pending Updates * * Crude debugging method that will spit out all pending plugin * and theme updates for admin level users when...

Debugging and Error Logging in WordPress

So most servers do error logging but if you want to improve this functionality you can modify your wp-config.php file with the following code snippet.  It consolidates not only the PHP errors but also logs any WordPress bugs that get reported via WordPress debugging...

Delete a files contents through bash

So I was looking for a way to automatically overwrite a log file utilizing the command prompt and a cron job.  So this is how it can be accomplished. cat /dev/null > /location/of/file.txt By adding this to the crontab it will overwrite the file at whatever interval...

Delete files older than 15 days in BASH

So every now and then I find myself wanting to delete all files older than a certain number of days.  Here is the linux command to do so. find ./* -mtime +15 -type f -delete  

Directory Protection for WordPress via .htaccess

So I have found that the regular Directory Protection feature in CPanel does not work straight out of the box with WordPress installs.  In the below code after you setup a protection through CPanel you can take the provided data and customize it to match what is...