Menu
iThemes
WordPress Backup, Security & Maintenance
  • Products
    • iThemes Security Pro
    • BackupBuddy
    • Kadence WP
    • Restrict Content Pro
    • iThemes Sync
    • Why buy from iThemes?
  • Bundles
    • Essentials Bundle
    • Plugin Suite
    • WordPress Web Designer’s Toolkit
    • Customer Spotlights
  • Resources
    • Blog
    • WordPress 101 Tutorials
    • WordPress Ebooks
    • Weekly WordPress Vulnerability Report
    • The Ultimate Guide to Starting a Web Design Business
  • Training
    • Upcoming Webinars
    • Free Webinar Library
    • Premium Courses
    • Become a Member
    • Member Login
  • Support
    • Documentation
    • Get Help
    • Product Updates
    • Upgrade Policy
    • Contact
    • Our Mission: Make People’s Lives Awesome
  • Log In
WordPress News and Updates from iThemes
Categories
  • Product Updates
  • WordPress Backup
  • WordPress Block Editor
  • WordPress Ecommerce
  • WordPress for Freelancers
  • WordPress Security
  • WordPress Tutorials
  • WPprosper

How to Fix Common WordPress Errors

Written by "Professor" Benjamin on January 13, 2016

Last Updated on May 23, 2016

If you’re seeing an error on your WordPress site, don’t panic. In this post, we cover some of the most common WordPress errors and how to fix them.

WordPress error

The Dreaded WordPress Syntax Error

syntax error wordpress

This issue normally happens when a code snippet is added to a functions.php file or a custom plugin/theme is uploaded to WordPress. The error would look something like:

Parse error - syntax error, unexpected $end in /site/domain/wp-content/themes/child-theme/functions.php on line 82

The way to fix this syntax error is to look for the “missing bracket”.  So its either you opened a bracket and never closed it or there is some other unexpected “important” characters like:

 ) ] } ; , :

The Frustrating 500 Internal Server Error

This error is SO frustrating because it never gives enough details to figure out what is going on with the error.  It is like your server just gives up and quits to go take a nap and leaves you to figure out the issue.

So here are a few things to try that 95% of the time does the trick.

  1. Check the PHP memory limit in either the php.ini file or by adding the following line to your wp-config.php file.
    define(‘WP_MEMORY_LIMIT’, ‘64M’);
  2. The second area to check is a messed up .htaccess file. First, make sure you save a copy of the current .htaccess file by simply renaming it. Then test the site and see if it comes back. If it does… congrats you fixed it. Now go back to the Permalinks settings of WordPress and simply hit Save. That will generate a new valid .htaccess file for your site.
  3. If those don’t work. You may have to start deactivating plugins to see if you can figure out if the internal server error is a plugin issue.
  4. If those don’t work, try reuploading the wp-admin folder and the wp-includes folder from a fresh download of the wordpress.zip file.
  5. If you arrived at this fifth step, ask your hosting provider for help. 🙂

Error Establishing a Database Connection

This is a pretty easy two step process. The first step is to simply check and make sure the login and password information in the wp-config.php file are still valid and correct. If they are, the issue could be that the database server with your hosting company is just being unresponsive. So check their support or status page to see if that’s the case. Finally, it means the database is corrupted and its time to use BackupBuddy to restore the database.

Scary White Screen of Death

WordPress has its own version of Microsoft’s Blue Screen of Death… except WordPress’ version is simply a whiteout of your screen… nothing is there.  9 times out of 10 it is because of the PHP memory of your site being exhausted and you need to increase the PHP memory as described above.  If increasing the PHP memory limits doesn’t fix the issue you will need WordPress to supply more information for you.

We can turn on a better error report by setting up these two lines in the wp-config.php file.

error_reporting(E_ALL); ini_set(‘display_errors’, 1);
define(‘WP_DEBUG’, true);

This will replace the blank screen with errors, warnings, and other notes of information that we can use to google search a fix. 🙂

Side note: Before going to all the trouble with a white screen of death fix… try emptying your cache if you use a caching plugin and that can also fix the issue.

404 Errors for Posts

There are times that WordPress might return 404 errors for posts even though you know the posts exists.  This normally results from the Permalinks going wonky.  (Someone accidently switch permalinks and switched back and something went wrong.)  To fix this the easiest method is to go back to the Permalinks settings page and re-save the setting.

Missing Buttons on the Visual Editor

If you customize the visual editor, either through plugins or code snippets, there may be an issue where buttons go “missing”.  Most of the time this is a javascript error so to fix this try these 3 steps.

  1. Clear the browser cache (yes, your browser will cache javascript files)
  2. Replace all the TinyMCE scripts with fresh files.  This means replacing the folder wp-includes/js/tinymce with a fresh copy.
  3. Add this line to your wp-config.php to help track down an issue.

define(‘CONCATENATE_SCRIPTS’, false);

Hopefully the buttons should return after going through each of these steps.

Tired Memory

We’ve all seen these errors:

Fatal error: Allowed memory size of 234987 bytes exhausted (tried to allocate 98273422 bytes) in /site/domain/wp-includes/plugin.php on line 2349

When this happens you simply need to adjust the php.ini file of your server or add a line into your wp-config.php file.

define(‘WP_MEMORY_LIMIT’, ‘64M’);

Why can’t I upload anything with WordPress?

9 times out of 10 it is a simple directory permissions issue on your server.  Try setting the “directories” of the /uploads/ folder in the wp-content/ folder to 744.  (if that doesn’t work try 755.  Next you need to set the permissions for the FILES in the upload folder to 644.  

Remember that BackupBuddy (and iThemes Security) can analyze the permissions settings of your server and will recommend proper settings when needed.

WordPress Takes a LONG Coffee Break

You might visit your website and find this message on the front page:

Briefly unavailable for scheduled maintenance. Check back in a minute.

Huh… you weren’t aware of any maintenance.  This is actually a built in protection of WordPress that occurs when an update is taking place.  Before an update occurs, WordPress adds a hidden file called .maintenance to your server (in the same area as the .htaccess file.  If for some reason the update finished and WordPress forgot to remove the .maintenance file you will see that screen.

So, you simply delete the .maintenance file and your site is back.

Login Page Refreshing and Redirecting Cycle

If you ever experience the problem of attempting to login to your WordPress site with the correct username and password and it simply redirects back to the login page.  This normally is because the site_url and home_url settings fields in the WordPress settings page are incorrect.  To correct this issue, try the following steps:

  1. Clear the cookies in your browser to reset the cookies that are used for login authentication in WordPress.
  2. Try replacing the .htaccess file by renaming the old one and then visiting the Permalinks settings area and re-saving to generate a fresh .htaccess file.
  3. Hard code the site and home url into the wp-config.php file

    define(‘WP_HOME’, ‘http://domain.com’);
    define(‘WP_SITEURL’, ‘http://domain.com’);

There are many more issues you might run into during your time with a WordPress site but the most important thing to remember is to always have a current and valid backup of your site.  With BackupBuddy as your WordPress partner you don’t have to worry when you run into that unexpected issue because you’ll always have a working version of your WordPress site that can be restored.

Have you run into other issues before?  How did you fix your common WordPress errors?

"Professor" Benjamin
"Professor" Benjamin

http://www.wpstudio.com

Share via:

  • Facebook
  • Twitter
  • LinkedIn
  • More
Other related posts
wordpress vulnerability report
WordPress Vulnerability Report – August 17, 2022

WordPress Vulnerability Report – August 10, 2022
the response is not a valid JSON response
How to Fix “The Response Is Not a Valid JSON Response” Message in WordPress
WordPress Vulnerability Report
WordPress Vulnerability Report – August 3, 2022

Comments

  1. Henry Ramirez says:
    January 19, 2016 at 3:39 pm

    This is good to know, thanks for the tips, agency charge a lot of money for doing this simple fix.

    Reply
  2. David says:
    June 6, 2017 at 1:12 am

    Just wanted to say thanks for the list it helped me a lot to create my own set of errors list. Keep the editorial stuff going will be looking forward to seeing more in the future.

    Reply

Respond

Click here to cancel reply.

Get updates on new themes & plugins plus special discounts

About iThemes

  • The Team
  • Contact Us
  • Website Accessibility Statement
  • Sitemap

Resources

  • Blog
  • Documentation
  • WordPress Tutorials
  • Free WordPress Ebooks
  • Free Webinar Library
  • Free Upcoming Webinars
  • iThemes Training
  • Affiliates

Customers

  • Member Panel Login
  • Support
  • FAQs
  • Upgrade Policy
  • Licensing
  • Terms and Conditions
  • Refund Policy

Top Products

  • BackupBuddy
  • iThemes Security Pro
  • iThemes Sync
  • Restrict Content Pro
  • WPComplete
  • WordPress Hosting
  • WordPress Plugins
  • Content Upgrades
  • WordPress Landing Page Plugin
  • BackupBuddy Stash

iThemes Media LLC Copyright © 2022 All rights reserved | Privacy Policy

© 2022 All Rights Reserved.

[class^="wpforms-"]
[class^="wpforms-"]
Share via
Facebook
Twitter
LinkedIn
Mix
Email
Print
Copy Link
Powered by Social Snap
Copy link
CopyCopied
Powered by Social Snap