One place for hosting & domains

      Methods

      How to Fix Fatal Error: Maximum Execution Time Exceeded in WordPress (6 Methods)


      Updating your plugins and themes regularly is necessary to keep your site running at full capacity. However, the fatal WordPress error “maximum execution time exceeded” can prevent updates and leave you feeling concerned about your website’s performance.

      Fortunately, you can use a few methods to remove the error or increase the maximum execution time: You can uninstall the problem software, use a plugin, or edit your site’s code directly to solve the issue in no time.

      In this article, we’ll look at what the WordPress maximum execution time error is and why it happens. Then we’ll walk you through six methods you can use to solve the problem and keep your site running smoothly:

      1. Uninstall problem software
      2. Use a plugin
      3. Adjust the wp-config.php file
      4. Update the php.ini file
      5. Edit the .htaccess file
      6. Contact your hosting provider

      Let’s get started!

      What the WordPress Max Execution Time Error Is (And Why It Happens)

      The maximum execution time error is one of the most common WordPress errors. It can appear when you are trying to update your WordPress plugins or themes.

      The maximum execution time exceeded error in WordPress.

      It alerts you that your site was unable to perform the updates you requested.

      This error happens because of the PHP scripts on your website. PHP is a scripting language that is the foundation of WordPress sites. It is made up of code that controls how the website functions and shows different elements to users. As such, the maximum execution error directly relates to how long a PHP script takes to run.

      PHP scripts have a maximum execution time to keep your site functional and secure. For example, if there were no limit, a hacker or malicious software could use neverending scripts to dismantle your website’s server and make your data vulnerable. Furthermore, PHP scripts running for a long time can divert resources from your server.

      Plugins are more likely to trigger the error because they come with a lot of code from external sources. WordPress is an open-source platform, so any developer can design and upload plugins for it. If you install content from lesser-known developers, it may come with flawed code and cause issues in your site’s PHP scripts.

      Themes and general WordPress updates can also cause the problem. However, this is less common.

      What the Standard Max Execution Time Is

      At DreamHost, we set the maximum execution time on our end. As with most other hosting providers, it usually has a duration of 30 seconds. This is typically enough time for most PHP scripts to run successfully. If you’re using a different hosting provider, you should be able to contact them directly to find out what your site’s maximum execution time is.

      However, large websites with multiple resources may need slightly longer maximum execution times. Otherwise, they may not be able to complete their processes before the clock runs out.

      Additionally, some developers may use very long execution times of more than 300 seconds. However, we don’t recommend this for most websites because of the security issues that we discussed previously.

      How to Figure Out if the Error Has Occurred

      It is usually obvious that the maximum execution time error has happened because you will see a notification in your WordPress dashboard.

      But it may not always have the same wording. For example, it may read as “fatal error” or ‘critical error.” The notification also might not reference the maximum execution time. However, all of the warnings share similar components that can alert you to the source of the problem.

      Front-end users may also be able to see the error. If they visit the site when the update process has failed, they might see a message telling them that your website is experiencing technical difficulties.

      Wikipedia experiencing technical difficulties.

      However, this error message doesn’t only appear because your maximum execution time has been exceeded. As such, you’ll want to check and see if it shows up in your WordPress dashboard as well.

      Finally, you may receive an email from WordPress alerting you that the maximum execution time has been exceeded. This happens because of the WordPress 5.2 update, which introduced PHP error protection that automatically notifies you when your site has problems with its themes or plugins. As such, you will almost immediately know that there is an issue with your updates.

      Skip the Stress

      Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

      How to Fix the Max Execution Time WordPress Error (6 Methods)

      There are a few different methods you can use to eliminate the max execution time error or increase your site’s maximum execution time.

      You may first want to consider your comfort level with directly editing your site’s files and adding new code. If this method sounds beyond your technical abilities, there are fortunately other options available.

      1. Uninstall the Problem Software

      One of the simplest ways to fix the maximum execution time error is to uninstall the software causing the issue. One of your plugins or your site’s theme is likely the culprit, so you can start there.

      We recommend using this method if you have a hunch that a specific application is causing the problem. For example, you may have recently added a new plugin or updated an old one.

      If the error locks you out of your site, you can access the dashboard via Recovery Mode. If you received an email from WordPress about the failed updates, it usually includes a link to Recovery Mode and may even tell you which plugin caused the problem.

      Then, navigate to Plugins > Installed Plugins and click on Deactivate underneath the relevant item. Click on Delete to remove it.

      If you don’t know what is causing the maximum execution time exceeded error, you can deactivate all of your plugins and reactivate them one by one. Refresh each time and see if you can find the one that triggered the problem.

      You can use Secure File Transfer Protocol (SFTP) to remove the plugin. Alternatively, if you have a fully hosted DreamHost account, you can do it with your control panel file manager.

      Navigate to Websites > Manage Websites, and hover over the preview above your domain name. Then click on Manage.

      How to manage websites on DreamHost.

      Scroll down and select Manage Files.

      How to reach the file manager on DreamHost.

      Then navigate to your website’s directory folder. Enter the Plugins folder, right-click on the plugin you want to remove, and select Delete.

      Deleting a plugin using the DreamHost file manager.

      Hopefully, this will resolve the error. If not, you can move on to the following methods.

      2. Use the WP Maximum Execution Time Exceeded Plugin

      One of the easiest ways to increase the maximum execution time is by using the WP Maximum Execution Time Exceeded plugin.

      The WP Maximum Execution Time Exceeded plugin home page.

      This tool enables you to increase the maximum execution time to 300 seconds (five minutes) while you have it activated.

      You may prefer to use this instead of the previous method because it can increase your maximum execution time globally. This can be beneficial if you want to give functional plugins and themes a little more time to complete their updates.

      To use the plugin, you can download the .zip file and head to your WordPress dashboard. Navigate to Plugins > Add New and click on Upload File > Choose File.

      Adding a new plugin on the WordPress dashboard.

      Click on Install Now. Once the plugin is installed, select Activate Plugin to complete the process.

      The plugin automatically increases your site’s maximum execution time right away, so you don’t need to do anything else. If you ever want to remove it and revert to the original settings, you can head to Plugins > Installed Plugins and click on Deactivate.

      How to deactivate the WP Maximum Execution Time Exceeded plugin.

      This is a straightforward fix for the maximum execution time exceeded error. However, it does not enable you to choose a custom duration. If that’s something you’re looking for, you may prefer to use one of the following more intensive methods.

      3. Increase the Maximum Execution Time via wp-config.php

      You can increase the maximum execution time in your site’s wp.config.php file. This is a core file that contains a lot of important information about your site. For example, it has your website’s name, host name, login username, and password.

      We recommend this method if you want to customize your maximum execution time. It enables you to add code directly into your WordPress directory file. Furthermore, it’s relatively quick and easy to do.

      Before you start editing the file, we recommend backing up your entire WordPress site. The wp-config.php file is essential for your website, so you don’t want to make a critical and irreversible mistake. With a backup on file, you can revert to your original settings with minimal effort.

      You can find the file by using the DreamPress file manager or your SFTP application and looking for wp-config.php. Right-click on it and select Edit.

      How to edit the wp-config.php file in the DreamHost file manager.

      Alternatively, you can click on Download and edit the file with a simple text editor like Notepad. Once you’re in the wp-config.php file, scroll to the bottom and insert the following code:

      set_time_limit(X);

      “X” represents the maximum execution time in seconds. For example, you can replace it with “300”, and it will extend the duration to five minutes.

      Now you can save the file, and you’ve successfully changed the maximum execution time!

      4. Increase the Maximum Execution Time in php.ini

      You can also increase the maximum execution time by creating a new php.ini file. This is a document that controls your PHP settings, such as resource limits, upload sizes, and file timeouts.

      This method can be an excellent option if you use a Content Management System (CMS) like WordPress. php.ini affects all the scripts in your system, so you won’t have to edit each one individually.

      Not all servers support php.ini files, so you’ll need to check first to make sure yours does. Then you can increase the PHP execution time with this method.

      In the DreamHost server, php.ini files are called phprc. First, you’ll need to create a new phprc file. Go to your SFTP dashboard and navigate to your user directory.

      Locate the phprc file in your site’s version of PHP. Then right-click on it and select View/Edit to add your new code. You may see this warning.

      A warning message in FileZilla.

      Click on the check box next to Always use selection for all unassociated files and select OK. This will open the file with your text editor. Next, you can enter the following code to change the maximum execution time:

      max_execution_time = 500

      This will change the max execution time to 500 seconds. Then you need to kill the existing PHP processes to update the phprc file and make the changes take effect.

      5. Increase the Maximum Execution Time in .htaccess

      The .htaccess file is another place where you can adjust the maximum execution time. This file controls changes across the different directories of your WordPress site. However, not all servers use it, and it is most commonly found in Apache servers.

      You may prefer to use this method if you don’t want to play around with the wp-config.php file and if your server doesn’t support php.ini files.

      Before starting, we recommend backing up your .htaccess file. By doing so, you can reinstate it if you make any major mistakes. Simply make a copy of it and save it elsewhere on your computer.

      Then use your chosen SFTP to edit the original .htaccess file. If you’re using the DreamHost file manager, you can right-click on it and select Edit.

      How to edit the .htaccess file with DreamHost.

      Otherwise, you can open it with your text editor. Then enter this code to change the maximum execution time:

      php_value max_execution_time 300

      You can substitute the “300” for any other amount you prefer. Finally, save the changes, and the file will apply them to your site.

      6. Contact Your Hosting Provider to Request an Increase in Maximum Execution Time

      If you would prefer not to change your site’s files yourself, you have another option. You can contact your hosting provider directly, and they can increase the maximum execution time on your behalf.

      This method could be an excellent option if you’re short on time or have limited technical skills. However, it may cost extra depending on your hosting provider.

      With a DreamHost account, you can contact our Professional Services team to make these changes for you. Navigate to the Contact Support page in your account dashboard and submit a ticket.

      How to contact the DreamHost support team.

      There, you can outline your desired changes and add any details about your site. Our team may ask for more details, and then we’ll get to work on making the changes!

      Bonus WordPress Error Articles

      Need to resolve other technical issues on your website? We’ve got you covered! Our team has put together several guides to help you troubleshoot the most common WordPress errors:

      And if you’d like a soup-to-nuts walkthrough on running a successful WordPress site, be sure to check out our WordPress Tutorials. It’s a collection of 42 guides written by our WordPress experts that’ll help you navigate the WordPress dashboard like a pro.

      Take Your WordPress Website to the Next Level

      Whether you need help navigating the WordPress dashboard, fixing incorrect database credentials, or choosing a web host, we can help! Subscribe to our monthly digest so you never miss an article.

      Fixing the Fatal Error: Maximum Execution Time Exceeded

      The maximum execution time exceeded error in WordPress can get in the way of updating your plugins and themes. Although it can be frustrating when it happens, there are several ways to solve the problem quickly.

      You can fix the maximum execution time WordPress error with the following strategies:

      1. Uninstall the problem item.
      2. Increase the maximum execution time with a plugin like WP Maximum Execution Time Exceeded.
      3. Adjust the maximum execution time by editing the wp-config.php file.
      4. Increase the maximum execution time in the php.ini file.
      5. Edit the .htaccess file to increase the maximum execution time.
      6. Contact your hosting provider to change the file on your behalf.

      Are you looking for a hosting provider that can take care of all your site’s technical issues? Check out our DreamPress packages and leave the troubleshooting to the experts!

      Image credit: Wikimedia Commons.



      Source link

      How to Fix the 403 Forbidden Error in WordPress (5 Methods)


      Being barred from your own site can be very frustrating, especially when you have no idea what is causing the problem. The 403 Forbidden error typically occurs when you’re trying to log in to WordPress or visit a specific page on your site.

      Fortunately, there are a few simple fixes for this common WordPress error. Depending on your hosting plan, you may even be able to resolve the issue with help from your web host.

      In this post, we’ll take a closer look at the 403 Forbidden error and its main causes. We’ll then show you five ways to fix it. Let’s get started!

      What the 403 Forbidden Error Is (And What Causes It)

      The 403 Forbidden error is one of several HTTP status codes used by servers to communicate with your browser. When the 403 status code shows up on your screen, it means that your server thinks you do not have the required permission to access that particular page.

      The 403 Forbidden error typically appears when you’re trying to log in to your WordPress admin area or when you visit a specific page on your site. You may also encounter it while installing WordPress.

      The error is usually accompanied by one of the following messages (or similar variations):

      • “403 Forbidden – Access to this resource on the server is denied.”
      • “Forbidden – You don’t have permission to access [directory name] on this server.”
      • “You are not authorized to view this page.”
      • “It appears you don’t have permission to access this page.”
      • “403. That’s an error. Your client does not have permission to get URL [address] from this server.”

      Instead of the “403 Forbidden” status, you might come across a simple notification that says “Access Denied.” It is also possible that you will get the following message: “Access to [domain name] was denied. You don’t have authorization to view this page.”

      There are several possible causes of this 403 Forbidden error. The most likely one is an incorrect file permission on your server. However, this error can also be triggered by a faulty plugin or a corrupt .htaccess file.

      In most cases, you should be able to resolve the issue on your own. However, you might also need to get in touch with your hosting provider to access or change some settings on your site.

      Skip the Permission Settings Stress

      Avoid WordPress troubleshooting when you sign up for DreamPress. Our friendly experts are available 24/7 to help solve website problems — big or small.

      How to Fix the 403 Forbidden Error in WordPress (5 Methods)

      Now, let’s go through a few ways you can fix the 403 Forbidden error in WordPress. First, we recommend that you make a backup of your site just in case something goes wrong and you need to restore it to an earlier version.

      1. Change Your File Permissions

      Every WordPress file on your site’s server has its own permissions. These settings control who can access and modify its contents. If these files have incorrect permissions, your server will stop you from accessing them.

      If you want to check your file permissions, you can simply contact your hosting provider, and a technical expert should be able to take care of it. You can also do this yourself by connecting to your site with a Secure File Transfer Protocol (SFTP) client such as FileZilla.

      Alternatively, you can also access your site through the file manager in your hosting account. If you have a DreamHost account, you can navigate to WordPress > Managed WordPress in the sidebar. Then, find your domain and select Manage.

      Accessing your domain in your DreamHost account.

      On the next page, click on the Manage Files button in the Details section.

      Accessing your file manager via your DreamHost account.

      You’re now in the file manager. Next, open the folder labeled with your domain name to access your site’s directory.

      Inside your root directory, select the folder that contains all of your WordPress files. If you’re using FileZilla, this is the public_html folder. Then, right-click on it and choose File Attributes.

      Changing the file permissions using FileZilla

      In the popup window, locate the Numeric field and enter “755” or “750” in the value box. Then select the Recurse into subdirectories and Apply to directories only options, and click on OK.

      Changing the file permissions for the directories.

      So far, you’ve applied the correct file permissions for your directories. You’ll now do the same thing for your files.

      To start, right-click on your public_html folder and select File Attributes. This time, you’ll need to type “644” in the Numeric value field. Then choose Recurse into subdirectories, select Apply to files only, and click on OK.

      Changing the file permissions in FileZilla.

      Note that your wp-config.php file requires a different numeric value than the ones stated above. This unique value prevents other users on your servers from accessing the file. Therefore, you’ll need to manually change its file permission.

      In your root directory, find the wp-config.php file, right-click on it, and select File permissions. Next, set the numeric value to “440”, and click on OK.

      Changing the permissions for the wp-config.php file in FileZilla.

      Now, every one of your WordPress files and folders should have the correct permissions. Once you’ve completed the above steps, go back to your site and try to reproduce the 403 Forbidden error. If your site is working fine, you don’t need to do anything else.

      However, don’t worry if you’re still facing the same problem. There are still a few more fixes to try, and some of them are very simple.

      2. Deactivate Your Plugins

      As we mentioned earlier, the 403 Forbidden error can also be caused by a faulty plugin. To find out if this is the case, you’ll need to deactivate your plugins and then reactivate them one by one.

      To start, connect to your site via FileZilla or the file manager in your hosting account. Then, in your site’s root directory, open the wp-content folder and locate the plugins folder. Then right-click on the plugins folder and select Rename.

      How to rename the plugins folder in your site’s root directory.

      Next, give the folder a new name, for example, “plugins_test. This will automatically deactivate all of your plugins.

      If you can access your site after renaming the folder, then the 403 Forbidden error was caused by a glitchy plugin. Your next step is to find out which one it is.

      First, return to your site’s root directory and rename the plugins folder back to “plugins”. Then navigate to the Plugins page in your WordPress dashboard and activate the plugins one at a time. Keep doing this until you are able to reproduce the error. Once you’ve identified the faulty plugin, you can either remove it or contact its developer for support.

      3. Delete and Restore the .htaccess File

      A corrupt .htaccess file can also trigger the 403 Forbidden error. This file is located in your site’s root directory and enables WordPress to interact with your server.

      Inside your site’s root directory, locate the .htaccess file, right-click on it, and choose Delete.

      Locating and deleting the .htaccess file in your site’s root directory.

      Now, try accessing your site again. If the 403 Forbidden error has disappeared, then your .htaccess file may have been corrupted. This means you’ll need to create a new one.

      To do this, navigate to Settings in your WordPress dashboard and select Permalinks. Then click on the Save Changes button at the bottom of the page, and a new .htaccess file will be generated. You can look for the file in your site’s directory to ensure that it has been restored.

      4. Deactivate Your CDN

      If you’re still getting the 403 Forbidden error after completing the above steps, you may have a problem with your Content Delivery Network (CDN). This is a network of servers located in different parts of the world, with each server hosting a copy of your website. Many hosting plans come with a CDN to help boost your site’s performance.

      To see if your CDN is the cause of the error, you’ll need to temporarily disable it. You can do this by logging into your hosting account and locating your CDN settings. If you’re unable to access your CDN, we recommend getting in touch with your hosting provider.

      5. Check Your Hotlink Protection

      Finally, you might want to check your site’s hotlink protection. Hotlinking is when someone embeds media files on their site by linking them directly from another site. Some individuals may do this to use another site owner’s bandwidth (rather than their own), which is effectively theft.

      Some hosts and CDN providers offer hotlink protection. However, if this is not set up properly, it can trigger a 403 Forbidden error on your site. Therefore, you may want to contact your web host about this issue. While you may want to look into this yourself, it’s best to get help from a technical expert to ensure that your hotlink protection is configured correctly.

      Additional WordPress Resources

      If you’re new to WordPress, you’re bound to run into some technical issues while setting up your site. To help you fix some of the most common WordPress errors, we’ve put together several how-to guides:

      Meanwhile, if you’re looking for more WordPress tips and hacks, check out our WordPress Tutorials. This collection of guides will help you set up and design your first WordPress site like a professional.

      Take Your WordPress Website to the Next Level

      Whether you need help navigating the WordPress dashboard, decoding an error message, or finding the plugins folder, we can help! Subscribe to our monthly digest so you never miss an article.

      Bye, WordPress 403 Error

      The 403 Forbidden error appears when your server denies you permission to access a page on your site. This is mainly caused by a faulty security plugin, a corrupt .htaccess file, or incorrect file permissions on your server.

      In this post, we looked at five main ways you can fix the 403 Forbidden error using an SFTP client like FileZilla or the file manager in your hosting account:

      1. Change your file permissions.
      2. Deactivate your plugins.
      3. Delete and restore the .htaccess file.
      4. Deactivate your CDN.
      5. Check your hotlink protection.

      If you want to receive expert help when encountering WordPress errors, you may want to consider a managed WordPress hosting plan. Our DreamPress plans come with 24/7 technical support for WordPress site owners, so you can spend less time troubleshooting and focus your efforts on growing your business.



      Source link

      Leveraging MongoDB’s Built-in Authentication and Authorization Methods



      Part of the Series:
      MongoDB Security: Best Practices to Keep Your Data Safe

      MongoDB, also known as Mongo, is a document database used in many modern web applications. As with any database management system, it’s critical that those responsible for managing a Mongo database adhere to the recommended security best practices, both to prevent data from being lost in the event of a disaster and to keep it out of the hands of malicious actors.

      This series of conceptual articles provides a high-level overview of MongoDB’s built-in security features while also highlighting some general database security best practices.

      Authorization and authentication are two concepts that are critical for understanding database security. These two concepts are similar, but it’s important to understand what they are and what makes them different. Authentication is the process of confirming whether a user or client is actually who they claim to be. Authorization, on the other hand, involves setting rules for a given user or group of users to define what actions they can perform and which resources they can access.

      Authentication

      MongoDB features several mechanisms that allow you to authenticate users, with the default mechanism being its Salted Challenge Response Authentication Mechanism (SCRAM). SCRAM involves MongoDB reading and verifying credentials presented by a user against a combination of their username, password, and authentication database, all of which are known by the given MongoDB instance. If any of the user’s credentials don’t match what the Mongo database expects, the database won’t authenticate the user and they won’t gain access until they present the correct username, password, and authentication database.

      You can also use a text file to act as a shared password for a group of connected MongoDB instances, such as a replica set or shard cluster. This method, known as keyfile authentication, is considered to be a bare-minimum form of security and is best suited for testing or development environments, as advised by the MongoDB documentation.

      For production environments that implement sharding or replication, the MongoDB documentation recommends using another authentication mechanism: x.509 authentication. This involves distributing valid x.509 certificates — either self-signed or obtained from a third-party certificate authority — to the intended cluster members or clients. These are different from keyfiles, though, in that each machine gets its own dedicated x.509 certificate. This means that one machine’s certificate will only be useful for authenticating that machine. A client that presents a stolen x.509 certificate to the database server will not be able to authenticate.

      x.509 authentication leverages a concept known as mutual authentication. This means when a client or cluster member authenticates themself to the server, the server is likewise authenticating itself to the client or cluster member. If the client or cluster member attempts to connect to a database server with an invalid x.509 certificate, it will be prevented from doing so since the mutual authentication will fail.

      Authorization

      MongoDB manages authorization through a computer security concept known as role-based access control. Whenever you create a MongoDB user, you have the option to provide them with one or more roles. A role defines what privileges a user has, including what actions they can perform on a given database, collection, set of collections, or cluster. When you assign a role to a user, that user receives all the privileges of that role.

      MongoDB comes with a number of built-in roles that provide commonly-needed privileges. A few of these are available for every database, but most are only available for the admin database, as they’re intended to provide powerful administrative privileges. For example, you can assign a user the readWrite role on any database, meaning that you can read and modify the data held in any database on your system as long as you’ve granted a user the readWrite role over it. However, the readWriteAnyDatabase role — which allows the user to read and modify data on any database except for local and config — is only available in the admin database, as it provides broader system privileges.

      In addition to its built-in roles, Mongo also allows you to define custom roles, giving you even more control over what resources users can access on your system. Like users, roles are added in a specific database. Other than roles created in the admin database, which can include privileges to any database in the system, a user-defined role’s privileges only apply to the database in which the role was created. With that said, a role can include one or more existing roles in its definition, and a role can inherit privileges from other roles in the same database.

      With such fine-grained control over user privileges, you can set up dedicated users to perform certain functions, like a cluster administrator to manage replica sets and sharded clusters or a user administrator to create and manage users and custom roles. This type of user management strategy can also help harden your system’s security, as it reduces the number of users with broad privileges.



      Source link