Part II: Common Errors Using WordPress and How to Fix Them!

In PART I of this post, I covered the most common problems that occur when trying to install WordPress and get your site up and running smoothly.

Though it can often be the case that a whole new set of common problems and challenges emerge once you’ve built your WordPress site and that’s what we’ll be covering in this PART II. Below we’ll go over the most common WordPress problems I’ve seen from our customers and how to fix them!

Common Errors Using WordPress and their fixes

Lost Admin Password & Email Retrieval Is Not Functioning

So, you’ve installed WordPress successfully and are ready to create a site. First you need to login to the WordPress back-end, but what if you’ve lost or forgotten your password? Don’t sweat it! In this case you just need to enter your username or email address in the “Lost your password?” page.

Okay, so you did it, but didn’t receive any link to create a new password via email. How can we fix it? I will suggest you two ways: via phpMyAdmin and via FTP.

phpMyAdmin

 

  • Log in to cPanel, click on phpMyAdmin under Databases.
  • Select your WordPress database. For example: Username_wrdp1.
  • Go to wp_users table, click on Browse.
  • Look for your Username and click Edit.
  • Reset your password by inserting a new value into user_pass field. Remember, it is case-sensitive.
  • Once you completed this, click the dropdown menu under Function, and choose MD5 from the menu.
  • At the bottom of the page, click the Go button.

Now you can login to WordPress back-end with the new password. 

Here’s another solution:

Via FTP

 

  • Log in to your FTP account (use some FTP client, FileZilla for example).
  • Go to “../wp-content/themes/(your active theme)/”, download the functions.php file.
  • Open functions.php and add the code below right after the first <?php: wp_set_password(‘YourNewPassword’,1);
  • Replace YourNewPassword with your desired new password. The “1” in the script is the user ID number in the wp_users table.
  • Upload the edited functions.php file back to your server.
  • After you’re able to log in to WP Dashboard remove the code from the functions.php file.

So, your password is changed and now you know 2 ways to restore it in case you forgot the password again!

Blank page of death

The WordPress blank page of death is one of those extremely annoying problems like having an error establishing a database connection. In most cases there is no error output and you’re at a loss to figure out what the problem is.

First what you need to do is to enable debug mode in WordPress to see the exact error message instead of a blank page. Add the following code in your wp-config.php file:

error_reporting(E_ALL); ini_set(‘display_errors’, 1);

define( ‘WP_DEBUG’, true);

Once you add this, the blank screen will now have errors, warnings, and notices. These may be able to help you determine the root cause.

The majority of the time, it means that you exhausted the memory limit. This could be caused by a plugin that you may be using that is not functioning properly or there may be an issue with your web hosting server. In this case, it may require a lot of troubleshooting.

One of the solutions is to increase PHP memory in WordPress. How do you do this? We got your back; here’s an article in WordPress Codex that will walk you through the process.

 

 

If increasing the memory limit doesn’t help, then you need to start troubleshooting. The reason may be found in some of the plugins. Let’s go ahead and disable all the plugins. In WordPress Codex you’ll find a detailed description about troubleshooting this issue.

If none of the above fixes it, then you should try to re-install a fresh copy of WordPress. It is always possible that a core file may have been corrupted. Did either of those two solutions help? Let me know in the comments section if they worked or what problems you faced.

Fatal error: Allowed memory size of 33554432 bytes exhausted

This is one of the most common WordPress errors, and you can easily fix it by increasing the php memory limit in WordPress. So let’s do it!

 

 

All web servers need memory to efficiently run multiple applications at the same time. Server administrators actually allocate specific memory size to different applications including PHP.

But then how do we increase it if required? Let’s find it out.

First, try editing the wp-config.php file on your WordPress site. Paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’:

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

The above code tells WordPress to increase the PHP memory limit to 256MB.

I want to also offer this article about memory exhausted issue as it can provide more in depth explanations.You can now visit your WordPress site and the memory exhausted error should disappear.

Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.

Fatal error undefined function is_network_admin()

You might get this error when trying to login to WordPress admin after updating WordPress. This means that the WordPress auto-update feature failed.

This may be due to your internet connection being unavailable, some incorrect file permissions or something not working properly with the main WordPress files.

 

 

If you’re experiencing this issue, it would be better update your WordPress install manually. This means:

  • Download the latest WordPress and unzip it
  • Deactivate all your plugins
  • Rename your wp-includes and wp-admin directories to something like old-wp-includes and old-wp-admin
  • Upload the new /wp-includes and /wp-admin folders
  • Upload the individual files from the new /wp-content folder to your existing /wp-content folder, overwriting existing files (don’t delete your /wp-content, just upload the new file like *index.php)
  • Upload the new version of the rest of files from the root directory to your existing WordPress root directory
  • Log in to your WordPress admin and you will be given a link to URL like “http://domain.com/wordpress/wp-admin/upgrade.php” and follow the instructions. Once the manual update is complete, the error should be fixed. If not, try clearing your cache.

The “Briefly unavailable for scheduled maintenance” message that remains after an automatic upgrade

 

 

Updates are a vital part of keeping your WordPress website fully functional. However, sometimes you might receive a maintenance mode error message because the update process was interrupted. Okay, you’re allowed to take that irritated heavy sigh; now, let’s fix it together.

Let’s try the following with your .maintenance file:

  • locate your .maintenance file in your root directory. It’s a hidden file (here’s how to unhide them) located in the same folder as your wp-config.php file.
  • delete the .maintenance file.

Follow those two steps and the problem should be solved! Not bad, right?

Too many redirects issue in WordPress

‘Too Many Redirects’ error in WordPress is a common issue that WordPress users may come across. In this paragraph, I will show you how to fix this issue in WordPress.

On Firefox, this error will be displayed like this:

“The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”

This error usually occurs due to a misconfigured redirection issue. As you know, WordPress has SEO friendly URL Structure which uses the redirect function.

 

 

The most common misconfiguration is when a user has incorrect URL in WordPress Address URL or Site Address URL settings.

To fix this, you need to change your WordPress Address and Site Address.

Go to Settings > General in your WordPress dashboard and change your WordPress and Site Address. If you have your address with the www prefix, then change it to www URL in the settings, and vice verse.

In case you don’t have access to the WordPress Admin area, you can update these settings in wp-config.php file. Just connect to your website using an FTP client (like FileZilla). Once you are connected to your site, you will find wp-config.php file in your site’s root directory. You need to download and edit this file using a text editor you like. Add these two lines to the file and don’t forget to replace example.com with your own domain:

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

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

Save the file and upload it back to your web server. Now try to access your WordPress site. If you still can not access your site, then try to add your domain with www prefix.

Also the problem may be caused by some of your plugins; deactivate them as described in this article and the error may disappear.

Syntax error in WordPress

Parse Error: Syntax Error, unexpected ….

Have you ever seen this message on a website? Most probably you have. This error message occurs when, for example, a line of code is missing a semicolon, a curly bracket or features a wrong character.

 

 

When this error appears it will tell you in which file the error persists (functions.php for example) and approximately which line of code it exists (it may not always be the exact line so be sure to check just before and just after). Once you find out which file is causing the error, download it via FTP and fix its syntax and upload it back again to your server. The error will be fixed. That’s all.

Onto happier and more productive WordPressing

Hopefully that felt more like a quickly ripped off band-aid rather than a slow and painful process and my intention was to make these seemingly inevitable problems easy to hop over.

Instead of the usual jaw-gritting, heavy sighing and aggravating run around in trying to solve these issues,  I’m confident the tips I’ve provided will save you a lot of grief.

I would love to hear if these tips helped and will be happy to take any questions you may still have in the comments section below!

 

Recommended Posts