One place for hosting & domains

      Error

      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 “Upload: Failed to Write File to Disk” Error in WordPress (3 Ways)


      Are you encountering the “Upload: Failed to write file to disk” error message when uploading files in WordPress? Whether you’re trying to add images or videos to your site, this message can be very frustrating, as it prevents you from sharing your amazing visuals with your audience.

      Fortunately, you can troubleshoot this issue by following a few simple steps. In some cases, you’ll just need to contact your web host to get it fixed.

      In this post, we’ll take a closer look at the “Upload: Failed to write file to disk” error and its main causes. We’ll then show you three simple ways to fix this problem. Let’s get started!

      What Causes the “Upload: Failed to Write File to Disk” Error in WordPress

      The “Upload: Failed to Write File to Disk” error message typically comes up when you’re trying to upload media files to your WordPress site. There are a few possible causes, the most common one being incorrect file permissions.

      Every file and folder on your WordPress site comes with a set of permissions. These are controlled by the web server and determine which site users can access and edit your files and folders. Thus, if the permissions are incorrect, you may be unable to perform certain actions on your site, such as uploading images to your media library.

      However, this error could also be caused by other issues, including a full WordPress temporary folder. It’s also possible that you’ve reached the disk space limit provided with your hosting plan.

      Next, we’ll take a closer look at these possible causes. We’ll also walk you through a solution for each scenario.

      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 “Upload: Failed to Write File to Disk” Error in WordPress (3 Ways)

      Now, let’s look at three easy ways to fix this disk error in WordPress. As always, we recommend that you perform a backup of your site before proceeding. That way, if something goes wrong, you can restore your site to an earlier version.

      1. Change the File Permissions

      As we mentioned earlier, the “Upload: Failed to write file to disk” error is likely caused by incorrect file permissions. If you want to check these permissions, you can contact your hosting provider and ask them if they can do it for you. Alternatively, you can do this yourself by accessing your site’s root directory.

      First, you’ll need to connect to your site via a Secure File Transfer Protocol (SFTP) client such as FileZilla. You can also access your site’s directory through the file manager in your hosting account.

      If you have a DreamHost account, start by navigating to Websites > Files in the sidebar. Then locate your domain and click on the Manage Files button.

      Accessing your site in DreamHost

      This will take you to the file manager. To access your site’s directory, you can open the folder labeled with your domain name. Inside, locate the wp-content folder and right-click on it.

      Next, select File permissions.

      Locating the wp-content folder in your site’s root directory.

      In the pop-up window, go to the Numeric value field and enter “755” or “750” in the corresponding box. Next, you can select the Recurse into subdirectories and Apply to directories only options and click on OK.

      Changing the file permissions of your subdirectories in FileZilla.

      You have now set the correct file permissions for all subdirectories inside the wp-content folder. This includes the uploads folder, which is where your uploaded media files are stored.

      However, you’ll also need to set the correct permissions for the files within those folders. To do this, you can right-click on the wp-content folder again and select File permissions.

      In the Numeric value field, type in “644”. Then select the Recurse into subdirectories and Apply to files only options, and click on OK.

      Changing the file permissions of your files in FileZilla.

      Don’t worry if you’re still unable to upload files to your site after checking your file permissions. There are a couple of other things you can do to resolve the issue.

      2. Empty the WordPress Temporary Folder

      If changing the file permissions doesn’t solve the problem, you may need to empty your temporary folder. WordPress processes your media uploads in PHP. This means that your images are first saved in a temporary folder on your web server before being transferred to your uploads folder.

      If the temporary folder is full, WordPress won’t be able to write your files to disk until you’ve emptied it. Unfortunately, you cannot access this temporary directory via SFTP.  However, you can simply contact your hosting provider and ask them to empty the folder for you, and then check to see if the error has been resolved. If you have sudo users, you could ask them to clear your temporary folder.

      Alternatively, you can try to resolve this issue by defining a new location for WordPress to store your media (instead of the temporary folder). First, you’ll need to connect to your site via an SFTP client or the file manager. Then locate the wp-config.php file, right-click on it, and select View/Edit.

      Editing the wp-config.php file in FileZilla.

      Next, you’ll need to paste in the following code right before the line that reads “That’s all, stop editing! Happy publishing”:

      define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’);

      Save your changes, then navigate to the wp-content folder, open it, and create a new folder inside it called temp.

      Creating a temp folder inside the wp-content folder.

      When you’re done, you can return to your website and try to upload an image. If the file disk error was caused by the temporary folder, the issue should now be resolved.

      3. Upgrade Your Hosting Plan

      The disk error could also be a sign that you’ve outgrown your current hosting plan. For example, if you’ve been adding a lot of content to your site, including media files, new pages, and plugins, you might have used up all the disk space available in your account.

      Your web host may be able to tell you how much disk space you have left. If you’re a DreamHost client, you can check your disk usage by logging into your hosting account and navigating to Billing & Account > Disk Usage in the side menu.

      Checking your disk usage in your DreamHost account.

      If you’ve reached your disk space limit, you might need to upgrade to a more advanced hosting plan. This will give your site more room to grow. We recommend getting in touch with your hosting provider to discuss the possibility of switching to a higher plan.

      Additional WordPress Error Articles

      Do you want to learn how to resolve other technical issues on your site? We’ve put together several tutorials to help you troubleshoot the most common WordPress errors:

      If you’re looking for more information about running a WordPress site, make sure to check out our WordPress Tutorials. This is a collection of guides designed to help you navigate the WordPress dashboard like an expert.

      Take Your WordPress Website to the Next Level

      Whether you need help navigating file permission issues, choosing a web hosting provider, or finding the best plugin, we can help! Subscribe to our monthly digest so you never miss an article.

      Fix the “Upload: Failed to Write File to Disk” Error

      The “Upload: Failed to write file to disk” error message prevents you from uploading files such as images and videos to your WordPress site. Incorrect file permissions on your site normally cause this error. However, you may also be seeing this message because you’ve used all the disk space offered with your hosting plan.

      In this article, we looked at three simple ways to fix this common WordPress error:

      1. Change the file permissions of your WordPress site using an SFTP client like FileZilla.
      2. Empty the WordPress temporary folder by getting in touch with your web host.
      3. Upgrade your hosting plan to access more disk space.

      At DreamHost, we provide 24/7 expert support to help you efficiently resolve technical issues. We also offer reliable managed WordPress hosting solutions to help you grow your business while also making it easy for you to upgrade to an advanced plan as your site grows.



      Source link

      How to Fix a 500 Internal Server Error on a WordPress Site



      Part of the Series:
      Common WordPress Errors

      This tutorial series explains how to troubleshoot and fix common errors that you may encounter when deploying, maintaining, and updating your WordPress installation.

      Each tutorial in this series includes descriptions of common deployment, maintenance, or update errors, and explores ways to fix and optimize your installation to scale.

      Introduction

      The 500 Internal Server Error code can be an ambiguous one when maintaining a WordPress installation, and issues in PHP or the web server) could likely be the culprit. If you are receiving a 500 error on your WordPress installation, this tutorial will share solutions to help you identify, solve, and verify that the changes you made were successful in getting your WordPress site running smoothly again.

      Step 1 — Identifying and Replicating the Issue

      An Internal Server Error HTTP code indicates that the server is having an issue, but cannot be specific about what sort of issue it’s having. Using this knowledge about the 500 Internal Server Error code, let’s take a look at the error message:

      `HTTP Error 500 NGINX`
      

      To solve this problem, the first step is to replicate and monitor the error. If you recently enabled, changed settings, or upgraded a plugin, there is a chance the plugin is the culprit of your issues.

      Deactivating WordPress Plugins

      You may want to start your audit by disabling your plugins one by one and seeing if this changes anything.

      To deactivate your plugins temporarily, navigate to your WordPress dashboard and select Plugins. In your list of plugins, locate the Deactivate button and select it to start the process of disabling your plugin. Repeat this process for each plugin you have activated.

      Deactivate WordPress Plugins

      Auditing Web Server Logs

      As mentioned before, the 500 Internal Server Error on WordPress sites can happen for a wide variety of reasons, all related to the back end server. Auditing your web server logs can be a helpful practice to identify the issue or what may have caused it in the first place.

      To audit your server log, enter the following in the command line:

      • tail -f /var/log/nginx/error.log

      After entering, reload your current WordPress page to see if more information on the error is shown.

      If you still can’t identify the specific code that is triggering this error, the issue might come from an incompatible or damaged installation of either WordPress or PHP on the server. In the next step, you’ll see how to upgrade WordPress and PHP to make sure this is not what’s causing your error.

      Step 2 — Updating Your Installation

      To make sure the 500 Internal Server Error encountered on your WordPress installation doesn’t come from a damaged or incompatible installation of either WordPress or PHP, you’ll need to check your currently installed versions and update them accordingly. Keeping your web server and your WordPress installation up to date is a good security practice and should be incorporated as a regular maintenance task.

      Updating WordPress

      When you’re experiencing a 500 Internal Server Error, you may have limited access to your site, to update WordPress automatically. If the error is not preventing you from accessing your WordPress admin panel, log in to your /wp-admin dashboard. Because WordPress automatically sends notifications on new updates available, there may be a notification at the top of your dashboard:

      WordPress update notification

      If there is no notification, you can update your WordPress installation by visiting the Updates section, and selecting Update when prompted to update your WordPress site.

      After the update, move to Step 3 to test for the 500 error. If you are still experiencing the error, return to this step to update your version of PHP.

      If you aren’t able to log into your dashboard because of the 500 error, you’ll need to perform a manual WordPress update via the command line.

      Updating PHP

      To update your version of PHP on your WordPress installation, you’ll need to check your hosting provider’s steps to accessing and updating the PHP version on your installation. Some providers allow for updates via cpanel, while others require updates on their platform. Consult with your hosting provider’s documentation to learn more about how to update the PHP on your WordPress installation.

      You can also manually update your installation – learn more about this process and why updating PHP for WordPress sites is important on WordPress’ official documentation.

      After you’ve successfully updated your WordPress installation and/or version of PHP, it’s time to move to Step 3 to test for errors.

      Step 3 — Testing for Errors

      To test for errors after updating your WordPress installation and/or PHP version, try accessing your domain.

      If you encounter the 500 error again and have successfully updated your version of PHP as well as your WordPress installation, you’ll need to check with your hosting provider to dive deeper into issues with your server that may exist beyond your site.

      If you’ve successfully resolved the 500 error, you’ll have also updated your installation to ward against commonly experienced bugs and security vulnerabilities. It’s a good practice to keep both your WordPress installation and PHP versions updated for this reason, and can prevent 500 errors from occurring in the future.

      Conclusion

      In this tutorial, we successfully performed troubleshooting a 500 error on a WordPress installation, commonly experienced when either the WordPress installation or PHP version is damaged or outdated.

      For more information on error codes and how to solve them, visit our tutorial, “How to Troubleshoot Common HTTP Codes”.



      Source link