In our Some Common WordPress Errors and Their Solution article, we promised you we’ll be back with some more WordPress errors and their solution. And here we are!

Hence there is no confusion about what this article is about, so let’s jump straight into the common WordPress errors and their solution.

Stuck in Maintenance Mode:

common wordpress maintenance mode error

Core WordPress and plugins/themes launch many updates for availing many new advanced features. It’s important to update those core WordPress and plugins/themes for running a secure and smooth site.

Whenever we update our core WordPress and plugins/themes, WordPress goes into temporary maintenance mode and creates a temporary .maintenance file. Usually, the process is so quick that you and your visitors don’t even notice the change. However, sometimes when the new update is not installed properly, it gets stuck in maintenance mode, crashes the entire site, and makes it inaccessible to administrators and visitors.

Stuck in maintenance mode indicates that either you interrupted the updating by closing your browser in the middle of an update or running bulk updates and that causes the .maintenance file to still exists.

 Low storage and slow server time also can be the cause of this error. When you’re low on storage, the scripts running the installation may fail to delete the .maintenance file. On the other hand, if the server is slow to respond, the update script will timeout before disabling the maintenance mode.

Solution:

a) Delete The .maintenance File:

As we told before, WordPress creates a temporary .maintenance file during the update process. If you are stuck in maintenance mode that means the .maintenance file is still there. To fix that you must delete that file. Just access your root directory via FTP and delete the file called .maintenance. However, the .maintenance file may usually be hidden, so you might have to force show hidden files inside your FTP client.

b) Increase the PHP memory limit:

This error can arise because of insufficient memory. To increase your memory limit open the wp-config.php file via FTP and add the following line:

define('WP_MEMORY_LIMIT', '64M')

This will increase the memory limit to 64MB. You can also set it to 128MB or 256MB if necessary.

Sidebar below Content:

Sidebar below content error

The sidebar is helping the website visitor to move between pages and get more information. It can typically contain a navigation menu, WordPress search function, social icons, widgets, sign-up forms, links to related content, or similar content, and even disclaimers that you’ll want across your site. Ideally, the sidebar appears beside the content. But the problem occurs when the sidebar appears below the content, not to the next. This thing can make even the best-designed website look bad. It could also make your page look less impressive, reduce conversions and lead to poor revenues for your site.

If your sidebar is showing up in the right position, there are numerous reasons why there might be an error.

Adding a new plugin or making an update can because a conflict between your themes or any plugin which can affect your page’s layout. In case, you’re using a custom theme, the problem with float property or width ratio can be responsible as well. Make sure you have set the correct ratio for your custom theme.

Another problem might be more related to the browser being used. Some themes will have a different appearance on other browsers. Therefore, you might need to check that your sidebar is displaying consistently across browsers.

The primary cause of this behavior is problems with either the HTML or CSS on your site. It is usually a result of direct changes you’ve made to your site’s code, such as a theme or plugin file. Sometimes when users are adding code snippets to their site, they may accidentally keep an html <div> tag unclosed or add an extra closing </div> which may result in breaking the theme layout. Another common cause is using disproportionate width in CSS or not clearing float properly.

Solution:

a) Undo Your Most Recent Changes:

The first step you should take to troubleshoot the error is to undo the recent change you made on your site. If your sidebar moves after adding a plugin, custom code, or anything else to your website, simply undo the change. After undoing the change and refresh your site to see if the sidebar is back in its proper place. If you still see the error, you need to check your <div> tags.

b) Check <div> Tags:

If you see this issue on a specific page or post, you can do this to rectify the issue. Open the HTML layout of the content in the editor and ensure that all the open <div> tags are closed properly in the right place. Now, if all the <div> tags are closed, look whether there’s no extra closing </div> tag as this. If you find such a thing, just remove the extra </div> tag to fix the sidebar below content error in WordPress. Save the changes you made to this page and see whether you see the issue anymore. In case you see this error related to the <div> tags on multiple pages and posts, then fixing just one page won’t be enough. You need to fix the error on the template level because that’s where it is being created.

To get there, log in to your WordPress dashboard and navigate to ‘Appearance > Theme Editor’.

Choose the correct theme from the drop-down menu at the top, and then locate the template parts section in the sidebar.

The templates that generate pages and posts are usually under the content section. Find the one you need from the list, check it, and make any corrections. When you have finished editing the file, click on Save to save it.

If you know which file you edited, you can jump straight there. Otherwise, you’ll need to check them all for inconsistencies.

Also, use HTML Validator to find where the problem is from and fix it.

c) Fix your CSS:

CSS might also play a significant role in causing this error. The WordPress Customizer’s Additional CSS section enables you to add custom CSS to your site. If the margins are not set correctly in your style.css file, the sidebar may not have the space it needs besides your main content. You need to keep things in proportion. Double-check if the sum of the widths of the Content and the Sidebar elements exceed the width of the Wrap element. If it does, the smaller element will be pushed down to fit.

Locked Out of Your Admin Area:

common wordpress login errors

Sometimes you may find yourself locked out of the WordPress admin area. This is the most critical error because for other common WordPress errors you can use the admin dashboard. But without access to your site, you can’t do anything. Fortunately or fortunately, this is one of those WordPress errors that can have a variety of possible causes. It could be as simple as a typing mistake in your password, forgetting your login name or password,  or as complex as a problem with your .htaccess file.

If you mistake entering the password or forgot the login name or password to your WordPress website this is usually no big deal. But it becomes critical when you don’t have access to the email you signed up with. Another thing is if you are certain about the password and are still unable to log in then try resetting it. If you do not get the password reset email then chances are somebody has changed it and now you need to reset it using phpMyAdmin. A plugin or code that incorrectly tries to make some changes into the admin section can also lock you out. You may also lose access to the admin area due to database corruption or a hacked WordPress site.

Solution:

a) Reset your email and password via phpMyAdmin:

To reset your login info log in to your Cpanel. Click on phpMyAdmin and select your website’s database. Then, click on the wp_users table and edit your record. Now, enter a new value for user_pass. Remember phpMyAdmin uses MD5 encryption, so you have to convert your password into MD5. Choose the MD5 option from the drop-down menu in Functions. Click the Go button at the bottom to save your changes.

b) Restrict wp-admin access with plugin:

There are many ways to protect the Desktop but the plugin that offers you the most possibilities is WP Secure, with which you can limit access to wp-admin by IP or by type of user, you choose.

To make changes in a theme’s functions.php file, navigate to ../wp-content/themes/your_current_theme via FTP or file manager. Open up your functions.php file and add the following line of code.

wp_set_password(‘DesiredNewPassword', 1);

Put your desired new password in place of where it says “DesiredNewPassword.” Save the file and upload it again. Once you have logged into your website, remove the code from the file and upload it again.

c) Setup In The .Htaccess File:

Sometimes resetting the .htaccess file will help you overcome this error.

Unable to Upload Image:

common wordpress unable to upload image error

Sometimes WordPress does not let you upload an image from the back-end and it is one of the most annoying things that can happen to your WordPress site. This problem ruins user experience and makes your website look unfriendly and outdated. This actually happens due to wrong file and directory permissions, disallowed characters in the file name, and server-side issues.

Solution:

a) Check Image Size:

First, all you have to do is to check the size of the images you have chosen. In most cases, the images’ pixel ratio or dimensions are way too large for the website chosen to upload. These images can be easily uploaded when the pictures are resized and met with specific dimensions as per the website requirements

b) Increase PHP memory limit:

Sometimes images might cross the WordPress memory limit. In this case, you will have to visit your website via FTP. Find the folder that contains all the WordPress files. Find the wp-config file and introduce the code mentioned below.

define( 'WP_MEMORY_LIMIT', '256M' )

By doing this, you are telling WordPress that it can increase its memory limit to 256MB. Save the changes and upload wp-config.php back to the root directory of your WordPress in which it appeared. Remember to replace the old version of the file with the new one.

c) Change Uploader:

Using the native Image uploader might help you to overcome the issues. All you have to do is to follow the instructions.

Visit the dashboard section, go to the media section and visit ‘add new’.

Directly, upload an image using this option and you will find that the problems will go away when you use the conventional method.

d) Adjust Permission Level:

To address this, adjust to permission levels as needed. Use an FTP client to change permission for the WordPress uploads folder within wp-content. Do so by right-clicking it and changing the numeric value into 744 or 755 in the ‘File permissions’ Don’t forget to tick the ‘Recurse into subdirectories’ and choose the ‘Apply to directories only’ command. You’ll get the correct file permission after you click ‘OK’ Don’t forget to do the same steps for the files. Instead of using 744 or 755 as the permission level, choose 644.

Memory Exhausted Error:

wordpress memory exhausted error

Memory exhaustion error is very common in WordPress especially for sites that are hosted in low-priced shared hosting plans. When the bandwidth is low, and the resources of the server hosting of your site are strained, it may result in this error. It can occur when the plugins or themes require more space to run. Indications of this error could be a white screen of death or an error message like this one:

Fatal error: The allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/site1/wp-includes/plugin.php on line xxx

This error occurs when a WordPress script or a plugin exhausts the default allocated memory size limit.

Solution:

a) Increase PHP Memory Size:

It is better to approach the web hosting company to overcome this issue. You might have to increase the memory size of PHP. To increase the limit, open your wp-config.php file and add the following line of code within the main PHP tags.

define('WP_MEMORY_LIMIT', '64M');

The above code increases your memory limit to 64M.

b) Deactivate Plugins:

Sometimes an infected plugin might exhaust the entire free space and stop the applications from running. To check this, deactivate all the plugins through the FTP connection. Refresh the website to check whether the error is removed.

Final Words:

WordPress errors are common but they can decrease the overall site performance and users experience. Fortunately, most of the WordPress errors can be resolve by increasing the memory limit of PHP, deactivating and reactivating plugins and themes, and checking the .htaccess or config.php file. Choosing a good web host service provider also reduce half of the issues that occur maintaining a WordPress site.

Hope you find this article useful and get rid of these errors permanently. Visit our Blog page there are a lot more WordPress tips & tricks you may find useful. We hope this post helped you learn about some more common WordPress errors ahead of time and made you aware of how to fix them. If you missed the first part of the WordPress common error series check, Some Common WordPress Errors, and Their Solution. Hope we will come up with more articles on this WordPress Common Error series.

Share your thoughts in the comment section below. We appreciate further comments, support, or suggestions!

Integrate Your WordPress Site with Telegram For Better Communication
How To Add Favicon To Your WordPress Website

Leave a Comment

Your email address will not be published. Required fields are marked *