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

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

Directory Protection Minus Specific Files/Folders

Here is some code I found that can be used to protect a directory but tell the server to still allow access to specific files and folders. Apache SetEnvIf Request_URI "(path/to/folder/)$" allow SetEnvIf Request_URI "(path/to/file\.php)$" allow Order allow,deny Allow...

Find Files by Size

The below command is set to search the home directory of the server for files that are larger than 200M into a new text file large_files. Find Files find /home/ -xdev -type f -size +200M -exec ls -la {} \; | sort -n > large_files 1 find /home/ -xdev -type f -size...

HTTP to HTTPS Redirect via HTAccess

So to have an entire site get redirected from HTTP to HTTPS you can use the following redirect code within the .htaccess file. HTTP to HTTPS HTAccess Rewrite RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] 123...