One place for hosting & domains


      How to Fix the “Too Many Redirects” Error in WordPress (13 Methods)

      URL redirection is necessary when pages have changed their addresses permanently or temporarily. However, sometimes your website can get stuck in a redirection loop. If this happens, you may face the “too many redirects” error that prevents you from accessing web pages.

      Fortunately, you can use several methods to fix this redirection issue. The problem usually lies within your website, browser, server, or third-party plugins or programs. By taking the time to diagnose the cause of the error, you can solve it relatively quickly.

      In this article, we’ll look at common causes of the “too many redirects” error in WordPress and how to fix them. We’ll also explain how to prevent the problem from happening again in the future. Let’s get started!

      What Causes the “Too Many Redirects” Error in WordPress

      The “too many redirects” error happens when your WordPress website gets stuck in redirection loops. For example, it may try to send you to another URL that points to an entirely different link. If this process continues, your browser may trigger the error and fail to load the site.

      This error looks different depending on the browser you use. For example, in Google Chrome, it usually displays as “ERR_TOO_MANY_REDIRECTS” or “This webpage has a redirect loop.”

      The “too many redirects” error in Google Chrome. 

      If you use Mozilla Firefox, the error usually reads as “The page isn’t redirecting properly.” Alternatively, it displays as “This page isn’t working right now” in Microsoft Edge. Finally, Safari users may encounter “Safari Can’t Open the Page.”

      Unlike some other common WordPress errors, the “too many redirects” issue doesn’t usually solve itself. As such, you’ll need to troubleshoot the origins of the problem to fix it.

      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 “Too Many Redirects” Error in WordPress (13 Methods)

      Various factors can cause the  “too many redirects” error in WordPress. Therefore, you may need to try a few different methods to solve it. Let’s take a look at a comprehensive list of all the possible solutions.

      1. Force the Page to Refresh

      The first solution is a very simple one. You can force your browser to refresh and retrieve a new version of the page. This method overrides any stored data and displays the latest information available for the WordPress website.

      You might like to try this method first because it’s quick and won’t interfere with any other strategies. You’ll also know straight away if it has fixed the problem or not.

      You can use the following keyboard shortcuts to force a refresh in your browser:

      • Google Chrome (Windows): Ctrl + F5
      • Google Chrome (Mac): Command + Shift + R
      • Safari: Command + Option + R
      • Firefox (Windows): Ctrl + F5
      • Firefox (Mac): Command + Shift + R
      • Microsoft Edge: Ctrl + F5

      That’s all you need to do. However, if this simple method doesn’t work, you can continue through the troubleshooting guide.

      2. Delete Cookies on the Site

      Cookies are small blocks of data that enable websites to remember information about your visit. Then, the sites use that data to customize your experiences.

      For example, an e-commerce platform might send you on-site recommendations based on your previous purchases and searches. This way, you’ll be able to save time when looking for related products.

      However, cookies can sometimes hold onto incorrect data. In turn, this can cause the “too many redirects” error. As such, you can try deleting cookies from the WordPress site.

      In Google Chrome, navigate to the three dots at the top of your menu. Then, click on Settings.

      How to access the Settings in Google Chrome.

      Scroll down to Privacy and security and select Cookies and other site data.

      Finding cookies and other site data in Google Chrome.

      Move down the page and select See all cookies and site data. This will open a list of all the cookies that different sites hold with your data.

      A list of the cookies in a Google Chrome browser.

      Scroll down to find the site that is throwing the “too many redirects” error. Then, click on the trashcan icon next to its corresponding cookie to delete it.

      There is a slightly different method if you’re using Safari, Microsoft Edge, or Firefox. Once you’re done, try refreshing the WordPress site to see if the error is fixed.

      3. Clear Your WordPress Site or Server Cache

      Caching stores information about your site so that it can load faster the next time you access it. However, your cache may be holding outdated data and causing a redirection error. Therefore, you can try clearing out the stored information to see if it fixes the problem.

      If you can access your WordPress site, you can try clearing the cache with a dedicated caching plugin. For example, you could use WP Super Cache.

      The WP Super Cache plugin. 

      However, the redirection error will likely prevent you from getting to your dashboard. Therefore, you might need to try clearing your server cache.

      If you’re a DreamPress customer and have a shell account, you’ll need to log into your domain with Secure Shell (SSH) protocol. Then, you can enter the following code to purge your cache:

      curl -X PURGE “*” ; wp cache flush

      Alternatively, you can use the following command if you don’t use the WP Super Cache plugin:

      wp vanish purge --wildcard

      Once you’ve cleared out the cache, try reloading your site. If that doesn’t work, you may need to try another method.

      4. Clear Your Browser Cache

      Your browser also stores cached information about the websites you visit, including your own. If your browser is holding onto outdated data, you may need to clear it out to fix the redirection error in WordPress.

      If you’re working with Chrome, you can head back to Settings and scroll down to Privacy and security. Here, click on Clear browsing data.

      Clear browsing data in Google Chrome.

      This will bring up a new window that enables you to choose the data you want to delete. Select each item by checking the box next to it and then click on Clear data.

      Clearing data in Google Chrome.

      You’ll need to use slightly different methods if you’re working with a different browser. When you’re done, try reloading your site to see if the “too many redirects” error has gone.

      5. Determine the Cause of the Redirect Loop

      If the earlier methods didn’t solve the redirection error, you might like to try to diagnose the problem. Otherwise, you might spend a lot of effort on more time-consuming strategies that may not fix the error.

      There are a couple of different methods that can determine the cause of redirect loops. Firstly, you can enter your site’s URL into the Redirect Checker tool.

      The Redirect Checker tool from httpstatus. 

      This free online application enables you to enter multiple URLs and check their statuses. You can also specify the user agent, such as your browser, search engine bots, and mobile devices.

      Once you enter your URL, you’ll be able to see any status or error codes associated with your site at the bottom of the page.

      Status codes associated with the DreamHost URL. 

      Alternatively, some browser add-ons can show you the nature of redirects on different sites. For example, the Redirect Path Chrome extension flags redirect error messages in real-time.

      The Redirect Path Chrome extension.

      However, these tools might not always tell you why your redirect error is happening. If this is the case, you can continue with the other strategies in this troubleshooting guide.

      6. Temporarily Disable Your WordPress Plugins

      WordPress plugins are helpful tools that can introduce new functionalities to your website. However, these add-ons can also cause many issues, such as the “too many redirects” error.

      Anyone can develop and share WordPress plugins. As such, you may accidentally download one that contains faulty code. These add-ons also have frequent updates. If you haven’t updated your plugins, they may also be causing problems on your site.

      You may like to try this method if you recently added new plugins to your WordPress site. If so, you’ll probably have a good idea of the one causing the problem. Even if you don’t suspect a particular plugin, you can use the following steps to address the issue.

      If you can’t access your WordPress site, you’ll need to access the plugin files via a Secure File Transfer Protocol (SFTP) application such as WinSCP.

      The WinSCP SFTP client.

      Once you’ve connected the SFTP client to your site, you’ll need to find the folder that holds your plugins. You’ll usually find it under wp-content > plugins. Here, you’ll see a series of folders with the names of your installed plugins.

      Plugin folders for WordPress sites.

      Rename the plugins folder to “plugins-off”. This will deactivate all of your plugins. You should now be able to access your WordPress dashboard.

      Next, rename your plugins folder to its original title. Then go through the process of reactivating each add-on from your WordPress dashboard to see which one throws the “too many redirects” error.

      If you find a problem plugin, you’ll need to keep it deactivated. You’ll also need to find an alternative option for your website.

      7. Check Your WordPress Site Settings

      Sometimes an error in your WordPress site settings can cause redirect loops. For example, your website might be pointing to the wrong domain name for your site files. This more commonly happens if you’ve recently migrated your website.

      You can check your site settings in your WordPress dashboard. If you can access it, log in and head to Settings > General. You’ll then see two fields for WordPress Address (URL) and Site Address (URL).

      Accessing URL settings in WordPress.

      These two addresses should be identical unless you want WordPress to have its own directory. If the URLs don’t match, and they should, you can change the settings manually. You’ll need to edit your site’s wp-config.php file.

      Access your website using SFTP as you did previously. Then, locate and open the wp-config.php file in a text editor.

      Next, you’re going to paste the following code into the file:

      define( 'WP_HOME', '' );
      define( 'WP_SITEURL', '' );

      Replace the example URLs with the correct ones and save the file. Then reload your website and see if this solved the problem.

      8. Check Your SSL Certificate

      If you’ve recently migrated your site to HTTPS, there are various steps you need to complete. Unfortunately, if you miss some of them or misconfigure some settings, you could trigger the “too many redirects” error in WordPress.

      For example, if you didn’t install your Secure Sockets Layer (SSL) certificate correctly, it could be causing problems. If you didn’t add it at all, your site would automatically get stuck in a redirect loop.

      However, there might also be some minor issues with your SSL certificate installation. For example, you might have incorrectly installed the intermediate certificates that work together with your main one.

      You can check if your SSL certificate is correctly installed using a tool such as the Qualys SSL Server Test.

      The SSL Server Test from Qualys.

      This application scans your domain to find any associated SSL issues. This process can take a few minutes, but it will alert you to any problems with your certificate installation.

      9. Update Your Hard-Coded Links

      If you’ve just switched from HTTP to HTTPS, you’ll need to redirect your links. Otherwise, these URLs will point to locations that no longer exist on your website.

      Many users utilize plugins that can change these links automatically. For example, you could use Better Find and Replace.

      The Better Find and Replace plugin.

      However, it can be risky to use an add-on. If your chosen plugin has any issues with its code or updates, it can misconfigure your redirects and trigger the “too many redirects” error.

      As such, we recommend that you manually update your hard-coded links. You can do this with the search and replace method in WordPress.

      We have a complete guide on how to change your WordPress URLs. If you’re a DreamHost customer, you can also reach out to our technical support team for assistance.

      10. Check for HTTPS Redirects on Your Server

      HTTPS redirect server rules can also cause the “too many redirects” error in WordPress. These settings may have been misconfigured when you migrated your site.

      For example, the settings may not be correctly redirecting your links to HTTPS. As such, you’ll need to amend them.

      If your host uses an Apache server, you’ll need to edit your .htaccess file. Locate it within your SFTP client and open the file in a text editor. Then, you can enter the following code:

      RewriteEngine On
      RewriteCond %{HTTPS} off
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

      This code will cause all HTTP links to redirect to HTTPS automatically. Save the .htaccess file and try to reload your WordPress site. If it still triggers the redirect error, you’ll need to try another solution.

      Alternatively, you can adjust your HTTPS redirects on Nginx servers. If you’re not sure which server type your host uses, you might like to double-check with the company first.

      In Nginx, you’ll need to adjust the config file. Open it with your SFTP client as usual, and then locate the file. Insert the following code to set up your redirects:

      server { listen 80; server_name; return 301$request_uri; }

      Save the file and reload your WordPress site. If it doesn’t fix the problem, keep moving through this troubleshooting guide.

      11. Check Your Third-Party Service Settings

      Suppose you use a third-party service such as a Content Delivery Network (CDN). In that case, its settings may cause the “too many redirects” error. For example, Cloudflare is a popular option that can improve your website’s performance and security.

      The Cloudflare Content Delivery Network (CDN).

      Cloudflare can trigger the “too many redirects” error if you have the Flexible SSL setting enabled and an SSL certificate from another source (such as your hosting provider).

      In this scenario, your hosting server requests are already redirecting URLs from HTTP to HTTPS. However, with the Flexible SSL setting, all server requests are being sent in HTTP. As such, there are redirection loops happening between the different processes.

      As such, we don’t recommend using the Flexible SSL setting if you have an SSL certificate from a third-party source. Instead, change your Cloudflare Crypto settings and choose either Full or Full (strict). Doing so will automatically send requests in HTTPS.

      Additionally, you may like to enable the Always Use HTTPS rule in Cloudflare. This forces your site to send all requests in HTTPS. Therefore, it avoids causing a redirect loop and triggering the WordPress error.

      Finally, you might like to double-check that you’ve correctly configured your redirects in Cloudflare. For example, you’ll want to ensure that your domain doesn’t redirect to itself. Otherwise, it can trigger a redirect error.

      12. Check Redirects on Your Server

      We already covered how to check for HTTPS redirects on your server. However, other redirects can trigger an error when loading your WordPress website.

      For example, you might have a 301 redirect misconfigured. It might be pointing to the original link, triggering a redirect loop that prevents your site from loading. You can usually find redirects such as this one by checking your config files.

      If your host uses an Apache server, you may have issues with your .htaccess file. We recommend creating a new one with default settings.

      First, you’ll need to access your site via SFTP. Find the .htaccess file and save a copy of it in case you make a mistake. You can do this by renaming it to something like “.htaccess_old”.

      Next, you’ll need to make a new .htaccess file. Put the following code into it to establish default settings:

      # BEGIN WordPress
      RewriteEngine On
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      RewriteBase /
      RewriteRule ^index.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      # END WordPress

      Save the file and try reloading your WordPress site. If this process worked, you can delete the old .htaccess file and keep working with the new one.

      However, if your host uses an Nginx server, you’ll need to follow a slightly different process. This server type uses a variety of different config files, depending on the hosting provider. We recommend reaching out to your host to see which one applies to your situation.

      13. Contact Your Web Hosting Provider

      If you’ve tried all of these methods and you can’t fix the “too many redirects” error, it might be time to get some help. You might be missing a crucial step, or there could be a deeper issue with your WordPress site.

      By contacting your web hosting provider, you can get fast assistance with the error. For example, DreamHost customers can contact our technical support team.

      The DreamHost technical support landing page.

      You’ll need to log in to your account. You may also need to provide some information, such as your domain name and customer details.

      How to Prevent the “Too Many Redirects” Error in the Future (3 Methods)

      If you want to prevent the “too many redirects” error, there are a few steps you can take within your browser and site. Let’s take a look at a few different methods.

      1. Keep Your Plugins and WordPress Files Up to Date

      Outdated or faulty plugins are some of the leading causes of the “too many redirects” error. We already covered how you can deactivate any add-ons that may be triggering the issue. However, you can also take preventative steps with your current plugins and theme files.

      For example, you should update your plugins and WordPress theme frequently. You can tell if the software has a new release because you’ll see an alert in your WordPress dashboard. You can also navigate to Plugins > Installed Plugins.

      Updating plugins in WordPress.

      You can update any plugin by clicking on update now or Enable auto-updates. However, if you prefer to do the process manually, we recommend checking this page on a regular basis. Doing so will enable you to stay on top of any new releases and bug fixes.

      Additionally, you can report any faulty plugins if they cause the “too many redirects” error. Find the corresponding plugin support forum and document your issue to see if there is a known solution. Moreover, this action could prompt the plugin developers to fix the problem.

      2. Clear Out Your Cache and Stored Cookies Regularly

      Earlier in the guide, we explained how to clear out your cache and your saved cookies. These methods prevent your browser or WordPress site from trying to access outdated data.

      It’s likely that you won’t need to use these methods as most browsers are smart enough to remove outdated cookies and cache items. However, you can streamline the process by using a WordPress plugin to clear your site’s cache. An add-on such as this one can make sure that the most current version of your site is always available to your users.

      For example, if you’re using WP Super Cache, you can set up automatic processes. In your WordPress dashboard, navigate to Settings > WP Super Cache.

      Configuring settings in WP Super Cache. 

      If you want to remove cached files manually, you can click on Delete Cache. You can also navigate to the Advanced tab and scroll down to Expiry Time & Garbage Collection. Here, you can control how long cached files remain active on your site.

      Configuring the WP Super Cache settings.

      Here you can choose a custom cache timeout duration in seconds. Alternatively, you can select a custom time and interval to scan your site for outdated cache files. You can even elect to receive emails when this process happens.

      You likely won’t be able to access the plugin if you’re already receiving the “too many redirects” error. However, using this add-on can be a sound preventative measure.

      3. Use a Checklist or Company for Website Migrations

      Many of the causes for redirect errors in WordPress arise from migrations from HTTP to HTTPS. If you’re not familiar with migrating a site, you may miss some of the essential processes needed to make your website redirect and function correctly.

      Therefore, we recommend using a dedicated migration service to take care of the process. Professionals have experience with every aspect of migrating a site. As such, they’re less likely to make mistakes.

      If you prefer to do the migration yourself, you might like to use a checklist during the process:

      1. Prepare for the migration. First, you’ll need to make a copy of your site as a backup. You’ll also need to block access to your new site until you can check it for errors and migrate all your content.
      2. Create a URL mapping. You’ll need to create a redirect map for all your site’s URLs. Then, you’ll need to update them and create sitemaps so that you can transition the links easily.
      3. Create backups. Before starting the migration, you’ll probably want to back up all your individual content. Otherwise, you could lose it if something goes wrong during the process.
      4. Update your DNS settings. You’ll need to change your domain settings so that the URL points to your new address. Usually, your new host can take care of this for you.
      5. Set up your redirects. This step is crucial because misconfiguring your redirects can trigger the “too many redirects” error. Make sure you test each link to see that it works.
      6. Send your URLs to Google Search Console. You’ll need to verify your new site and send sitemaps with your new URLs indexed. This process is essential for Search Engine Optimization (SEO).
      7. Update your links. If other websites link to your site, you might like to ask them to update those URLs. Additionally, you should ensure that any ad campaigns contain the correct links for your new website address.
      8. Check for problems. Finally, you might like to run a site audit. This process can test all your links and identify any issues.

      If you’re migrating to a different server, the process might be slightly different. It pays to do your research before the migration to avoid any errors.

      Have Another Error Message to Fix?

      If you need to resolve other technical problems on your site, we’ve put together several comprehensive tutorials to help you troubleshoot every common WordPress error:

      And if you’re looking for more information and best practices for running a WordPress site, check out our WordPress Tutorials section. This is a collection of expert-written guides designed to help you navigate the admin dashboard like a pro.

      Take Your WordPress Website to the Next Level

      Whether you need help logging into the WordPress admin area, fixing a redirect issue, or finding the plugins folder, we can help! Subscribe to our monthly digest so you never miss an article.

      No More Redirect Loop Error

      The “too many redirects” error can happen in WordPress when the site gets stuck in a redirection loop. Although the problem can be frustrating, you should be able to solve it pretty quickly.

      You can usually fix the error by clearing out your cache or cookies. Additionally, there may be solvable issues with your server, third-party platforms, or plugins. Finally, if you still can’t troubleshoot the redirection error, your hosting provider may be able to help you out.

      Are you looking for a WordPress hosting provider that can help you with redirection issues and other common errors? Check out our DreamHost packages today! We provide personalized technical support to assist you with any WordPress problems.

      Image source: Flickr

      Source link

      How to Fix the Missed Scheduled Post Error in WordPress (2 Methods)

      Scheduling your posts in advance on your WordPress site can be a lifesaver. Writing multiple blog posts and scheduling them out should give you peace of mind knowing they’ll be published on time. However, sometimes this feature doesn’t work as expected, and you might end up with the missed scheduled post error.

      Fortunately, there are a few ways to troubleshoot this common issue. Whether you prefer to use a plugin or get under the hood yourself, you should be able to fix the missed scheduled post error and get back to business in no time.

      In this article, we’ll explain what the missed scheduled post error is and look at a few possible causes. Then we’ll share three easy ways to troubleshoot the error and two simple methods for fixing it. Let’s get started!

      What the Missed Scheduled Post Error Is (And What Causes It)

      When you schedule a post in advance, WordPress uses a “cron job” to publish it. “Cron” is a software utility that schedules tasks, while a cron job is the task itself. Typically, you’ll see cron used to handle repetitive tasks.

      Since WordPress is expected to run in a variety of environments, it can’t rely on traditional cron, which is intended to work in Unix-like operating systems. Instead, WordPress has WP-cron, which can simulate a system cron. When something goes wrong with the cron job publishing your scheduled posts, you’ll see the missed schedule error.

      There are a few potential causes of this error. One possible scenario is that your server or a plugin could be affecting your cron jobs. Common culprits include caching plugins. While these plugins are valuable for improving your site’s performance, they can also interfere with WP-cron.

      Another cause stems from the fact that WordPress uses simulated cron jobs. These simulations require someone to visit your website at the same time that the task is supposed to be run. If no one lands on your website at the right time, your post won’t be published.

      Obviously, if your site has experienced some downtime, then no one can visit it. This could prevent a cron job from running as expected.

      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 Troubleshoot the Missed Scheduled Post Error (3 Ways)

      If you’ve encountered the missed scheduled post error, there are a few simple ways to go about troubleshooting it. Let’s take a closer look at them.

      1. Check Your Timezone Settings

      If the timezone you’ve set in WordPress doesn’t match the timezone you use for publishing posts, it’s unlikely that these posts will go live as expected. Fortunately, there is a simple fix for this timezone issue, so it’s a good place to start.

      To check your timezone settings, go to your admin dashboard and navigate to Settings > General. Scroll down, and you should see a dropdown menu where you can select your timezone.

      Adjusting the timezone in General Settings.

      Using the dropdown, select the timezone you want to use for your WordPress website. Then, click on the Save Changes button, and you’re all set!

      2. Clear the WordPress Cache

      As we mentioned earlier, occasionally a WordPress plugin can interfere with the cache being cleared. So while caching can help to speed up your website, sometimes it can make it difficult for changes to take effect the way they should. Fortunately, clearing the WordPress cache manually is a simple process.

      The first step is to clear your browser’s cache. The steps you’ll need to follow will differ depending on which browser you use. If you’re still not seeing your scheduled posts, try clearing the WordPress cache as well.

      If you’re using a caching plugin, you’ll need to clear your cache through it. For example, if you’re using the WP Super Cache, go to Settings > WP Super Cache and select the Easy tab. Next, click on the Delete Cache button.

      How to delete the cache using WP Super Cache.

      Even if you use a different caching plugin, chances are the steps will be similar. Most of these plugins feature one-click cache deletion.

      Managed hosting plans tend to work a little differently. If you’re a DreamPress customer, you should already have the Proxy Cache Purge plugin installed to handle this for you. However, you can also purge the cache manually.

      To clear the entire cache, you just need to hover over the Cache icon in your dashboard menu and select Purge Cache (All Pages).

      Purging all pages using the Proxy Cache Purge plugin.

      You can also purge the cache for an individual post or page. To do this, you’ll need to navigate to the desired post either by entering the URL or by locating it in your dashboard and clicking on the View option.

      Once again, you’ll need to hover over the Cache icon in your dashboard menu, but this time you’ll have the option to Purge Cache (This Page).

      Purging a single page using the Proxy Cache Purge plugin.

      Don’t worry if your scheduled posts still aren’t showing up. There is one more troubleshooting method to try.

      3. Increase the WordPress Memory Limit

      Finally, it’s possible that your WordPress site needs more memory than what is currently allocated. An easy way to increase the memory limit is by editing the wp-config.php file.

      To access this file, you’ll need to use a Secure File Transfer Protocol (SFTP) client, such as FileZilla. Alternatively, you can use the file manager in your hosting account.

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

      Accessing the file manager through your DreamPress hosting account.

      This will take you to the file manager. To access your site’s directory, you’ll need to open the folder labeled with your domain name. Inside it, you should find the wp-config.php file.

      If you’re using FileZilla, the first step is to connect to your website. You may need to obtain your credentials from your web host if this is your first time using it. Once connected, locate the wp-config.php file.

      Locating the wp-config.php file using FileZilla.

      Next, right-click on this file to download it. Now you can use a text editor to open and edit the file. Add the following line of code anywhere before the line that reads /* That’s all, stop editing! Happy blogging. */:

      define( 'WP_MEMORY_LIMIT', 'XXXM' );

      You’ll want to replace the “XXX” with the amount of memory you’d like allocated to PHP, such as “96MB”. Remember to save your file before closing it. You can then use FileZilla to re-upload your updated wp-config.php file.

      How to Fix the WordPress Missed Scheduled Post Error in WordPress (2 Methods)

      If none of the above troubleshooting methods worked or if the error keeps happening, you might want to try a more advanced fix. Let’s look at two effective ways to resolve the missed scheduled post issue.

      1. Use a Plugin

      Scheduled Post Trigger is a free plugin that you can use to ensure that your cron job runs properly. It works by checking if any scheduled posts have been missed each time a visitor lands on your website.

      The Scheduled Post Trigger plugin.

      When it comes to plugins, setup doesn’t get much easier than this. Simply install and activate the plugin, and you’re ready to go.

      However, it’s best not to rely on this plugin for a permanent solution. Like with WP-cron, caching plugins can interfere with the Scheduled Post Trigger. If you experience any compatibility issues with this plugin, you might want to troubleshoot by disabling your other plugins one at a time to find the culprit.

      2. Manage Cron Jobs Directly Through Your Server

      Another option is to manage cron jobs directly through your server. This takes a couple of steps, but we’ll walk you through them.

      Step 1: Disable WordPress’ Crons

      The first step is to disable WordPress’ default crons. Otherwise, any new cron jobs you create may not function properly.

      To do this, you’ll once again need to access your wp-config.php file via SFTP or the file manager in your hosting account. This time, you can add this line of code to stop WordPress’ crons. You can add it anywhere above the /* That’s all, stop editing! Happy blogging. */ comment:


      Finally, save your changes. You can then re-upload your wp-config.php file and move on to adding your own cron job.

      Step 2: Add a New Cron Job

      Start at the DreamHost panel. Log in to your hosting account, then go to More > Cron Jobs. Click on the Add New Cron Job button.

      Adding a new cron job from the DreamHost panel.

      From here, you can fill in the required fields to set up your custom cron job. Having some knowledge of UNIX commands will be helpful to do this, but we’ll show you the basics that should get the job done.

      Adding a cron job manually.

      First, choose a User. It’ll need to be a shell user since they’re the only ones that can run cron jobs. You can also add a title to help you remember this job, such as Scheduled Post Trigger.

      Next, you can add an email to send the output to. If you don’t need an alert every time your site checks for scheduled posts – which you probably don’t – simply leave it blank.

      Now you’ll need to enter the command. First, take a look at this sample command from Zero Point Development:

      /usr/bin/php -q /home/zpd/public_html/wp-cron.php

      You can copy and paste the first part (/usr/bin/php -q) as is. However, the second part will take some customizing. You’ll need to write your own unique path to the wp-cron.php file. For example, the following code represents DreamHost’s server standard:

      /usr/bin/php -q /home/username/domainname/wp-cron.php

      If you’re not sure what that looks like, check out our support article on creating cron jobs. You can also reach out to our support team if you need further assistance.

      Once you’ve set up your cron job, you can schedule when it’ll run. We recommend somewhere around five minutes. Then, click on the Add button. That’s it! You can always return to the Crontab if you need to troubleshoot your cron job in the future.

      Have Another Error? We’ve Got a WordPress Tutorial for That

      Do you want to learn how to resolve other technical problems on your site? We’ve put together a number of guides to help you troubleshoot every common WordPress error:

      And if you’re looking for more information and best practices for running a WordPress site, check out our WordPress Tutorials section. This is a collection of expert-written guides designed to 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 finding the plugins folder, we can help! Subscribe to our monthly digest so you never miss an article.

      WP Scheduled Post Made Easy

      The WordPress missed scheduled post error typically occurs when something goes wrong with the cron job that publishes your content. Starting out with a few basic troubleshooting methods, such as checking timezone settings or clearing the WordPress cache, may be enough to get your posts published reliably.

      In this post, we’ve also looked at two ways to resolve the WordPress missed schedule error:

      1. Use a plugin such as Scheduled Post Trigger to ensure that your cron jobs run properly.
      2. Manage cron jobs directly through your server.

      Thanks to DreamHost’s intuitive, user-friendly panel, managing your cron jobs and other maintenance tasks is a straightforward process. Check out our WordPress-optimized hosting plans to get started!

      Source link

      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:


      “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