A Guide to Fixing the Most Common WordPress Errors

A Guide to Fixing the Most Common WordPress Errors
A Guide to Fixing the Most Common WordPress Errors

As we know that WordPress is simply dragged & drop, but certain errors can make you feel uncomfortable while working with WordPress.

Still, you don’t need to worry about them, as the maximum of those errors were reported earlier and were resolved by many means, which are elaborated in this article. So, we are about to explain the top 10 errors which every WordPress beginners face at any point, and to resolve those errors, solutions are written.

If there is any error other than mentioned in this article, you can simply contact your hosting provider and hopefully, they will help you resolve these errors.

403 Forbidden error

A 403 forbidden error could be a headache for a new user, which numerous issues can cause; this is one of the errors shown by WordPress, this error pops up when there is a permission issue in WordPress for a specific page or the whole website, could also be caused by the faulty security plugins used on-site by the developer which could ban a specific IP or group of IP’s from accessing the page or site. There could be multiple causes of this error which are mentioned below

  • Faulty or corrupt Plugin
  • Faulty .htaccess file
  • File permissions
  • Changes by Hosting provider

Faulty or Corrupt Plugin

A plugin could be a great annoyance when it changes your site, and instead of being beneficial, they become a headache. Some security plugins already described can stop an IP or group of IPs from accessing the page or site.

To tackle this error, you need to either disable that specific plugin or, as the best approach, deactivate all plugins at once and then activate plugins one by one and keep checking the site until you receive the 403 forbidden error when found the faulty plugin just deactivate it and activate all other plugins.

Faulty .htaccess file

A corrupt .htaccess file could also be sometimes a problem that can cause this type of error, and this file can be easily repaired without any help. To repair this file, you need to access the site’s File Manager and locate the mentioned file. After locating, just download the file to the local computer in case of any issue in the future. After downloading, just delete the file and go to the site. If the error is resolved, just go to settings >> permalinks and click save changes, automatically saving a copy of the .htaccess file to your file manager. If the issue is not resolved, try the 3rd method.

File Permissions

Sometimes incorrect file permissions could cause an error that lets your server think that you don’t have permission to access this file on request. This issue could be resolved by contacting the hosting provider, which might help you, but if you want to do it by yourself, please follow the below-mentioned steps.

  1. Go to FTP Client or File Manager
  2. Go to Root Folder
  3. Click to select a folder and right-click to Select File Permissions
  4. (a file permission dialogue box will open)
  5. (All folders on your WordPress site should have a file permission of 744 or 755.)
  6. (All files on your WordPress site should have a file permission of 644 or 640.)
  7. (You can set the file permission to the root folder to 744 or 755. Check the box next to ‘Recurse into subdirectories and then check the option that says, ‘apply to directories only’.)
  8. Click OK, and all files will be permitted
  9. Once done, you need to repeat the process for all files. (This time, you will use file permission of 644 or 640 and don’t forget to select ‘Recurse into subdirectories’and ‘apply to files only.)

Once the steps mentioned above are completed hope, your site will be accessible to you.

Changes by Hosting Service Providers

If all of the solutions mentioned above don’t work for you, just try contacting your hosting provider. Hopefully, they will resolve your issue as they might have made some changes to your file permissions without your knowledge as per the procedure to keep your files secure.

502 bad gateways

This error is prevalent among beginners and could take some time to be resolved as it can occur due to many reasons. Some of them are bad traffic, slow internet, server load, etc. There are many codes that are shown to the user when the user requests the server for a specific page by using their browser, but in normal life, these codes are not visible until and unless there is an issue with the page requested or the server that means this error appears when your server is unable to find the reason behind the poor response. There are some troubleshooting steps that, if taken, could resolve this issue sometimes, so let’s take a look.

Reloading Site

Reloading your site could resolve this issue sometime. As discussed earlier, this issue could be due to bad traffic or load on your server, and that server took a long to process your request, so the server responded with a 502 error. If the reloading site resolved the issue, you don’t need to worry and increase your server capacity.

Clearing Cache

As we all know, that cache stores a copy of the site to speed up the work and load it to you as soon as possible. This issue can sometimes be due to cache as the copy of the previous request could be still in your cache and your browser shows that copy again and again upon request. To clear cache in Chrome, you have to click three dots on the top right corner now find more tools, and upon hovering on it, you would discover clear browsing data. Open this and clear the cache by clicking the right options. You could also directly go to the clear browsing page by pressing ctrl+shift+delete. If clearing the cache doesn’t resolve your issue, you have to follow the next step.

CDN or Firewall Disable

Sometimes your CDN or Firewall enabled on your site creates an extra layer between browser and server which could show a 502 error to you to check if CDN is not a problem you need to disable it and reload your site if the issue is resolved, you need to contact the CDN provider when they resolve your issue just enable it again.

Plugin or Theme disable

Sometimes a faulty plugin or theme could cause a 502 error to check if this is not the issue. You need to deactivate all plugins and then reload your site if the issue is resolved. Congratulations, you found the error cause now. You need to enable the plugins one by one. If disabling plugins did not resolve your issue, you could also check if your theme is not making any problem by disabling that.

Contact Hosting Service Provider

If all of the steps mentioned above don’t resolve your issue, you need to contact your hosting service provider, and hopefully, they will resolve your issue.

Briefly Unavailable Scheduled for Maintenance

Sometimes this message is a blessing as you would be having a new feature added to your site or theme after the disappearance of this message automatically. Still, sometimes it could be a problem as you fall into maintenance mode until you delete the file which is creating this error. That file is mainly created in your website root folder by WordPress when you schedule maintenance to fix this error in the below-mentioned steps.

Deleting .maintenance file

To get a normal website again after this error occurs, you simply have to delete the .maintenance file from your root folder. To do this, go to your FTP and just delete this file. If you cannot find the file, please check the client that you have selected to show the hidden files.

Locked out of Wp-admin

This is a common error that almost every WordPress developer faces once in their lifetime. This error is primarily because of a forgotten password or a hack on your site. In this case, a hacker will change your password.

When you try to reset the password, you won’t be receiving an email from WordPress on a provided email address. Another reason is hacker changes your admin privileges which will result in a login. Still, you won’t be seeing the admin panel. To resolve this issue, please follow the following steps.

Reset your Password

There are two ways to get this motive first one is to reset your password through WordPress lost your password facility, which will take you to a page where you must enter your username or email. If it matches, this will send an email to the account specified with WordPress admin with the link to reset your password.

The second one is to reset the password using phpMyAdmin to use this method, simply go to WordPress hosting and click on phpMyAdmin once clicked, you will find different databases click on the right one you used for your site and open the table wp_users by clicking browse embossed in the front of it once opened click the user you want to change and delete the value in user_pass and change its value once entered the value, change function to MD5 when done click go and congrats you have changed the password.

Adding an Admin User

For doing this step, we need to make changes to 2 tables named wp_users and wp_usermeta.

Go to PhpMyAdmin, and after finding your database, click wp_users. When found, click the insert option on the top right corner. Once clicked, apply the below-mentioned steps.

  • ID – pick a number (in our example, we will use the number 4).
  • user_login – insert the username you want to use to access the WordPress Dashboard.
  • user_pass – add a password for this username. Make sure to select MD5 in the function’s menu (Refer to the screenshot below).
  • user_nicename – put a nickname or something else that you would like to refer yourself to.
  • user_email – add the email you want to associate with this account.
  • user_url – this would be the URL to your website.
  • user_registered – select the date/time for when this user is registered.
  • user_status – set this to 0.
  • display_name – put the name you like to display for this user on the site (it can be your user_nicename value as well).
  • Click on the Go Button

Next, we will be making changes to user_meta tables for this follow the below steps

  • unmeta_id – leave this blank (it will be auto-generated)
  • user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
  • meta_key – this should be wp_capabilities
  • meta_value – insert this: a:1:{s:13:”administrator”;s:1:”1″;}

Insert another row with the following information:

  • unmeta_id – leave this blank (it will be auto-generated)
  • user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
  • meta_key – this should be wp_user_level
  • meta_value – 10

Another Update in Process Error

That error occurs when there is an update in progress to the WordPress core by the user or by auto-update settings. This error usually remains there for as long as the update is in progress to lock you out so that you cannot update WordPress core or plugins simultaneously. Suppose this lock does not disappear after the update or 15-20 minutes later of initiating the update and making problems. In that case, you can manually delete this from the database by following the few simple steps mentioned below.

There are two simple methods to resolve the mentioned issue. One is the simple click and go, and the other one you have to do manually, which takes some time but is as efficient as the first one.

Plugin install

Several free plugins could be installed and mentioned issue could be resolved by making just a few simple clicks. When this plugin is installed, you have to click on it in the settings or plugin settings and click Fix another update in progress. This will automatically delete the update lock option from your WordPress, and you will be shown a success message. Once done, you just need to reload your website, and the issue will be resolved. By the way, you can thank us later.

Manual fix

To fix your error manually, you have to go to the phpMyAdmin area, where you will need to make some changes in your database. First of all, you have to locate your database in the example we will be stating our database as (my_wordpress). Once you find your database, you need to select wp_options and click browse next to it, displaying all the tuples or rows of the clicked table. Now you have to find the (core_updater.lock). Once done, please click delete on the left of the mentioned.

Once you are done with the procedure mentioned above, go to your site and try running the updates which you wanted to do in the first go.

Internal Server Error
The internal Server error is the most basic error, which occurs due to different problems which the server was unable to identify. Some basic issues, which can cause an internal server error like:

  • Corrupted .htaccess file
  • Php memory limit
  • Faulty plugins
  • Core files issue

Corrupted .htaccess File

To fix the corrupted .htaccess file, you need to visit your FTP server or look for the mentioned file in your localhost WordPress folder. After identifying your file, try to rename it – once renamed, reload your site. If it loads correctly, that means you have resolved the error. Before proceeding further, try saving permalinks by visiting Settings >> Permalinks which will hold a new copy of the file in your directory. If not resolved, follow the further instructions.

PHP Memory Limit

Another reason for that error is that when you are having an outage of memory limit to fix that issue, follow the below-mentioned steps. Mainly that error occurs when you are trying to upload an image or trying to sign-in to wp-admin

  • Create a text file named php.ini
  • Write (memory=64MB) in this without brackets
  • Save file
  • Upload it into your hostname/wp-admin/foldername using FTP

The issue will be resolved by following the steps mentioned above, but unsure of time-bound like this error could occur again until and unless you have found the exact issue to resolve. This try contacting your hosting provider and checking server logs to identify the issue. This issue might be because of a poor theme or a faulty plugin. If this does not work for your site – try the next option.

Deactivating all your plugins

Deactivate all plugins at once and then try to activate them one by one in wp-admin as there is no other simple way to tackle this situation. When you find the troublemaking plugin, just deactivate it and report it to the author.

Re-uploading the core files

If all the options mentioned above won’t work in your case, just try to re-uploading the WordPress core files with a fresh WordPress install before trying this option. Try to consult with your hosting service provider, as they may have server logs for your issue and could help you solve the issue.

That is one of those errors, which does not depict why it is being raised. So, it’s tough to tackle them as a beginner. You may have seen that error while uploading a file to your sites like themes or plugins because of the limit applied to your site to control. The size provided to you for uploading a different kind of content, and you can look upon the size provided to you for uploading a file by visiting the Media >> Add new link in your WordPress admin area.

There are usually three different ways to solve the mentioned issue, which are described below:

  • Editing Functions.php File
  • Editing .htaccess File
  • Editing php.ini File

Editing Functions.php file

It is a quite useful method and will resolve your issue but will roll back to the issue. If you try to change your theme to apply this method, you need to find the “functions.php” file in your theme files and just add the below-mentioned lines of code to your file

@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );

If you need to upload a file – size bigger than 120 Mb, please increase the Post_Max_Size, Upload_Max_Size, and Max_execution_Time, if you think your file could take long to upload depending upon your network or hosting provider speed.

Editing .htaccess file

You can also increase the limit of your file upload by making changes to the .htaccess file. For this, you need to locate the file in the FTP client. Once found, click view/edit and add the below-mentioned lines of code on the bottom of the file and save it. After saving the file, hopefully, your issue will be resolved. Remember to change the values according to requirements.

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

Editing php.ini File

This file could be found in your site’s root folder by connecting to an FTP client; once found that file, you just need to enter the below-mentioned lines of code to remove the error. If not found, you can upload a new file after entering the code to your root folder, which will surely increase the size. Remember to change the values according to requirements.

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 30

Maximum Execution Time Exceeds

Typically, this error occurs when you are trying to upload a theme or plugin to your site, and that uploading takes more time than specified in your hosting server. WordPress is written in PHP for easy understanding. A limit is set that how long a script could run; if the program takes time in loading due to any problem, this error is shown. To tackle this issue, you need to follow the below-mentioned steps.

Resolving the issue

Sometimes the error may be caused by any plugin installed on your site, which will show your visitor the following message “This Site is experiencing technical difficulties”. Suppose the mentioned issue is because of the plugin. In that case, you will receive an email from WordPress with the subject “Your site is experiencing a technical issue”. That will cause the error and a link to open the WordPress admin area in recovery mode, where you can just deactivate the problem-causing plugin or simply remove it if not needed.

Once removed, you will no longer face the same issue, but removing the plugin might disturb your site. So, there is another solution to that problem: to increase the size of maximum execution to your desire to do; so you just need to go to FTP Client and locate the .htaccess file where you need to make some changes once the file is opened. You have to add the following line of code before # END WordPress – without brackets (php_value max_execution_time 300). After writing the code, go to your site and reload. If the issue is still not resolved, increase execution time to double – keep until your issue is resolved. For your easiness, the procedure mentioned above is also written in the steps below.

To increase the time of execution

  • Open FTP Client
  • Locate and open the .htaccess file in a text editor
  • Add the below-mentioned line at the end of the .htaccess file
  • php_value max_execution_time 300

Redirecting and Refreshing Login Page

This is a common error that occurs, due to login cookies’ failure to save your logs or mainly due to a problem in URL settings. Whenever you try to login to your wp-admin, it usually validates your password and username with the one in your database. After all this process, WordPress stores a cookie in your cookies list for future use. If this wasn’t working properly, then WordPress redirect you back to the login page. If you are facing an error like this, please follow the below-mentioned steps to resolve it.

Cookie’s clearance

WordPress uses cookies to store your login authentication, so the simplest step to resolve the error mentioned above is to clear cookies and cache.

To Clear cookies in the different Web browser, please read their manual. In the provided example, some steps are listed to clear cache and cookies in Google Chrome.

  • Click three vertical dots on the top right corner
  • More Tools
  • Clear Browsing Data
  • Uncheck Browsing History, check Cookies and other site data, check Cached images and files
  • Click Clear data
  • Restart your browser

Now try reloading your desired page. If the problem persists, please try following the next step.

URL Updating

WordPress has a built-in option that sets your site URL and the URL where your WordPress is installed. Once logged in to wp-admin, you can change the WordPress URL under Settings >> General. As you are unable to log in to wp-admin, you can make changes to the wp-config.php file to fix the issue to make changes to the wp-config.php file. Please follow the below-mentioned steps

  • Open FTP Client
  • Find wp-config.php
  • Click View/edit
  • Enter the code mentioned in the next step just before the mentioned line is found “That’s all, stop editing! Happy publishing.”

If adding the above line of code does not solve the issue, try following the next step:

Deleting .htaccess file

.htaccess file could get corrupted sometimes which could lead to this error to coup with the mentioned error try deleting the .htaccess file to do so, follow the mentioned below steps

  • Open FTP Client
  • Find .htaccess File
  • Create a local backup by downloading it to your System
  • Click Delete

Once deleted, try logging in. If successful, then go to settings >> permalinks and click save without making any changes which will upload a new copy of the .htaccess file to your FTP. If the problem persists, try the below-mentioned step.

Deactivating WordPress plugins

WordPress plugins could be faulty and could make changes to your files, resulting in this kind of error. To resolve this issue, try deactivating all plugins using. To do so, follow the steps below

  • Go to FTP Client
  • Go to wp-content
  • Find and Right-click Plugins Folder
  • Try Renaming it to whatever you want

If still, you are encountering the issue, try Reverting to the default theme.

If you face any issue mentioned in this article and successfully solve it by yourself, congratulations, you are almost a pro of WordPress.

Posts returning 404

WordPress returning 404 error is sometimes very hectic and could be a significant issue usually. This lets you access your admin area and other things but don’t let you view the post pages. All of this happens if your .htaccess file is deleted from the FTP or it’s been corrupted for any reason. Rewrite rules could also be disturbed sometimes.

Fix for Online servers

You would need to reach out and fix your permalinks settings by going to settings >> permalinks in the WordPress admin area. When found the permalinks option, just click the save changes, which will automatically create a .htaccess file – it sometimes resolves that issue. If this does not resolve your issue, you need to change the overwrite rules and update .htaccess files manually, which you can do by following the mentioned steps.

First of all, you need to go to your FTP client and locate the .htaccess file, which could be found in the root folder with other folders like wp-content, etc. Once the file is found, you just need to click it and open it. If this file is not accessible, you need to change its permissions to rewriteable by entering 666 in its properties, and remember to change file settings to their normal once the changes are made. Once the file is rewriteable, you need to write the below mentioned line of codes into the .htaccess file.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

How to Solve on Local server

If you are working on a local machine and have installed a local server to your system, you just need to make changes to the Apache configuration and requires enabling rewrite_module in it

Too Many Redirects Errors

As we know, WordPress uses a URL structure that helps the user to navigate through the site easily and also makes it simple for SEO. The different plugins sometimes use this structure for creating temporary redirects. This error looks different in different browsers, so the developer does not get it quickly. There are several solutions to this problem. Let’s discuss the resolving of this redirect issue and keep your site running back online.

Clearing Cookies and Cache

Your browser saves a copy of your request for future use. When you try to reaccess, it is represented to you in a fast and efficient manner, which is called cache sometimes. This cache does not update. It keeps an old version of your site, which shows you the redirect issue; to check whether the cache is making a problem or not. You need to access your site on any other browser. If the site is accessed, you need to clear your browser cache by simply clicking the more tools and finding precise browsing data in google chrome. If this doesn’t resolve your issue, you need to pursue it further.

Deactivating plugins

Sometimes, to resolve this kind of issue, try deactivating all plugins, but you need to do this manually as you are locked out. To do so, follow the steps below

  • Go to FTP Client
  • Go to wp-content
  • Find and Right-click Plugins Folder
  • Try Renaming it to whatever you want

If still, you are encountering the issue, try Reverting to the default theme.

Fixing URLs

To fix the URL, you have to go to the wp-admin area and find settings>> general now, make WordPress and site URL same, so there is no confusion. If you cannot visit the wp-admin area, you have to make changes to the functions.php file manually. For this, you have to add the below-mentioned code in the functions.php file and remember to change example.com to your site name

update_option( 'siteurl', 'https://example.com' );
update_option( 'home', 'https://example.com' );

Reset .htaccess file

To do so, you need to go to the FTP client and find the .htaccess file next step you have to follow is to download this file as a backup. Once the backup is saved to the local computer, you have to delete this file and go to your wp-admin >> settings >> permalinks and click save changes to the new copy of .htaccess file is saved automatically.

If you enjoyed this article, then you’ll love UltaHost hosting platform. Get 24/7 support from our support team. Our powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the difference! Check out our plans 

Leave a Reply

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

Previous Post
Best 20 HTML Web Fonts

Best 20 HTML Web Fonts In 2022

Next Post
How to start your own social network platform

How to start your own social network platform?

Related Posts