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...
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...
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...
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
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...