4 Genius WordPress Hacks That Will Save Your Bacon

Table of Contents

WordPress is one of my "go-to" platforms when creating websites. It is flexible, highly customizable, and easy to use. However, over the years, I have encountered the occasional "oh $4!+" moments where I either broke something or got stuck trying to fix an issue. Luckily for you, I will reveal my 4 WordPress hacks that helped to get me out of a jam. Please do not attempt these hacks/fixes yourself if you are not comfortable in doing them. If you need help, you can always contact me. You'll want to bookmark this post because chances are you will need one of these WordPress hacks later to bail you out. With that being said, let's jump in.

Disable All WordPress Plugins

Whether performing a WordPress upgrade or installing a new plugin, on occasion either of these tasks have caused a website not to load by showing a blank screen. This is also known as the "White Screen of Death." Not only are you greeted with a white homepage, if you try to access your admin panel, you typically suffer the same fate. More often then not, this is caused by a WordPress plugin. The solution is to turn off the plugin causing the issue. But how can you turn off a plugin if you can't access the admin panel? The way I typically take care of this issue is through phpMyAdmin. This is what houses your WordPress database. Additionally, this is where the data is stored on which plugins are active or inactive. Before you try this below, please be sure to back up your database. In this case, I am wanting to turn off all plugins which can be done through the following steps.
  1. Access your phpMyAdmin and select your WordPress database
  2. Click on the "SQL" tab at the top
  3. Paste the following code into the text box:UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';
  4. Click "Go"
This will turn off all your plugins, but won't delete your files. You should then be able to access your website as well as your admin panel. You can then go to your plugins page and activate each plugin one at a time to find the plugin that is causing your site issues.

Automatically Creating WordPress Backups

Let's say that you tried to turn off all your plugins through the method I described above, but you still can't access your admin panel or website. If only there were a way to have access to a backup of your WordPress files and database? Lucky for you, if you implement automated backups ahead of time, you can have access to previous working files and databases for your website. I previously covered how to backup your WordPress site in this post. In the post, I provide several solutions on how to automate the backup process so that you will have the files whenever you need them. I highly suggest implementing one if not two ways to create backups to ensure you have what you need if you have to restore your WordPress site. When you have these backups available, you should be able to restore from a backup the day or two before in order to get your site back online.

WordPress Admin Password Won't Reset or Resend

If you have more WordPress sites than you can remember, chances are that you won't remember all your login information for each admin panel. One solution I use is the Chrome Extension called "LastPass". This handy extension will save all your login info for any website you want (not just WordPress). However, if you are trying to reset your password you might not remember what email address is the admin on the account. Is it yours? Is it the clients? If you have access to phpMyAdmin, there is an easy fix to this. Simply follow these steps:
  1. Access your phpMyAdmin and select your WordPress database
  2. Click on the "wp_users" table from the left menu
  3. Find the username you want to change the password for and click "edit"
  4. In the value input box for "user_pass" type in your new password
  5. Then select "MD5" from the "function" drop down column (this will encrypt your new password)
  6. Click "go"
Then go to your WordPress admin panel and login with your new password (and save it with LastPass).

Increase WordPress Media Upload Size

Every great WordPress blog post has some sort of media attached to it. Most WordPress users upload media through the admin panel. However, there are times (depending on your server settings) that may limit you from uploading large files. So how do you increase the limit size for WordPress uploads? There are actually a few ways to do this depending on your hosting environment. Please note that some of these may not work on shared hosting accounts.  Need to find a new WordPress hosting provider? Click the link above for some excellent picks, or if you want to go more granular, pick one of the hosts that offer free trials. Try before you buy!

Tweak Your Theme's "Functions" File

The first way you can try to increase your upload limit size is through your WordPress theme's functions.php file. You can access this through FTP by going to "/wp-content/themes/THEME-NAME/functions.php" or by accessing it through your WordPress admin panel at "appearance > editor" then click on the functions.php file. Within this file you will want to add/edit the following parameters (if not already present, add to the end of the file): @ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' ); You can change the 64M to be more or less if you wish.

Edit the PHP.INI File

If you have a shared hosting account, chances are you will not see this file on you server. However, you can create your own PHP.ini file and upload it to your root directory. While it doesn't work in all hosting environments, it is worth trying out. Open Notepad (or any plain text editor - not Word) and add the following lines to it: upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300 Save the file as "php.ini" and upload it to your root directory. Then try to upload your media. If you still are having issues, you can change the "64M" to "10M" and try again.

Modify the HTACCESS File

Another way to increase your WordPress upload size is to modify the HTACCESS file. Simply open your .htaccess file found in your root folder and add the following code to the end of the file: php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300 Save the file and re-upload it to your root folder. If you do not already have a .htaccess file, simply use a plain text editor and add the code to the file, save as .htaccess, then upload to the root folder. Again, some of these methods won't work on shared hosting accounts and you will need to contact your hosting company to increase the limits.

Go Ahead and Bookmark This

It never fails when updating a WordPress site, updating plugins, or just out of the blue your WordPress site goes haywire. You'll more than likely need to refer to a few of these WordPress hacks to fix your website. Like I said, you'll probably want to bookmark this for future reference. Don't be one of those people who think, "This is great info, I'll remember this site for when WordPress messes up for me." Just bookmark it now, you'll thank me later. [Bonus Tip] - Find the best WordPress SEO Plugins recommended by experts. So what other WordPress hacks do you use to bail you out of a less than ideal situtation? Be sure to let me know in the comments. Or if you need help fixing your WordPress website, be sure to drop me a line.
Leave a comment