Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come risolvere l’errore fatale: Tempo massimo di esecuzione superato in WordPress

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

State vedendo “Errore irreversibile: Il tempo massimo di esecuzione di 30 secondi è stato superato” quando si cerca di aggiornare un plugin o un tema di WordPress?

In genere, questo problema si verifica quando uno script PHP in WordPress impiega molto tempo per essere eseguito e raggiunge il limite di tempo massimo impostato dal server di hosting WordPress. Il limite di tempo è importante perché aiuta a prevenire l’abuso delle risorse del server.

In questo articolo vi mostreremo come risolvere l’errore fatale: tempo massimo di esecuzione superato in WordPress.

Fix Fatal Error: Maximum Execution Time Exceeded in WordPress Easily

Perché si verifica l’errore Maximum Execution Time Exceeded?

L’errore di tempo massimo di esecuzione superato si verifica in WordPress perché PHP, il linguaggio di programmazione alla base di WordPress, ha un limite di tempo per l’esecuzione di uno script. Questo limite è stato fissato per evitare che i server web vengano utilizzati in modo improprio.

Le diverse società di hosting stabiliscono diversi limiti di tempo, ma spesso 30-60 secondi sono sufficienti. Se uno script PHP sul vostro sito WordPress impiega più tempo di questo limite, si attiva l’errore di superamento del tempo massimo di esecuzione.

Maximum Execution Time of 30 Seconds Exceeded Error in WordPress

Come risolvere l’errore “Maximum Execution Time Exceeded” in WordPress

Sebbene l’errore di superamento del tempo massimo di esecuzione sia definito “errore fatale”, in realtà è uno degli errori più comuni di WordPress, facile da risolvere.

Vediamo come risolvere l’errore di superamento del tempo massimo di esecuzione in WordPress. Potete utilizzare i link sottostanti per passare ai diversi metodi di risoluzione dei problemi:

Importante: Per gli ultimi due metodi, vi consigliamo di eseguire il backup di WordPress per evitare che si verifichino errori sul vostro sito web. Per ulteriori informazioni, leggete la nostra guida su come eseguire il backup di un sito web WordPress.

Metodo 1: Utilizzare la modalità di ripristino di WordPress

A seconda del momento e del luogo in cui si verifica l’errore, WordPress può mostrare la notifica di errore “Questo sito sta riscontrando difficoltà tecniche” sul front-end.

Technical difficulties

Questo fa parte della funzione di protezione dagli errori fatali aggiunta in WordPress 5.2.

Potreste anche ricevere un’e-mail che vi indicherà quale plugin (se un plugin ha generato l’errore) ha causato il problema.

Technical issue email sent to admin

L’e-mail conterrà anche un link speciale.

Questo vi permetterà di accedere a WordPress utilizzando la “modalità di recupero”.

Recovery mode

Una volta lì, si può semplicemente disattivare o eliminare il plugin che causa l’errore.

Per maggiori dettagli, consultate la nostra guida su come utilizzare la modalità di ripristino di WordPress e come disattivare i plugin di WordPress.

Metodo 2: modificare il file .htaccess

Questo metodo è consigliato agli utenti di WordPress che non riescono ad accedere alla propria dashboard. Per risolvere l’errore del limite massimo di esecuzione, è necessario modificare manualmente il file .htaccess e aggiungere una semplice riga di codice.

È sufficiente collegarsi al proprio sito web utilizzando un client FTP o l’applicazione File Manager nel cPanel o in un altro cruscotto di hosting web.

Il vostro file .htaccess si trova nella stessa cartella delle cartelle /wp-content/ e /wp-admin/. Se non riuscite a trovarlo, consultate il nostro articolo sul perché non riuscite a trovare il file .htaccess e su come trovarlo.

Ad esempio, se si utilizza FileZilla come client FTP, lo si può trovare nella sezione “Sito remoto” della colonna di destra.

WordPress .htaccess File in Filezilla

Una volta trovato il file .htaccess, è sufficiente fare clic con il tasto destro del mouse e selezionare l’opzione “Visualizza/Modifica”.

Questo aprirà il file in un editor di testo.

View/Edit .htaccess File in WordPress

Successivamente, è necessario aggiungere il seguente codice in fondo al file .htaccess:

php_value max_execution_time 300

Se si utilizza il Blocco note come editor di testo, ecco come può apparire.

Una volta fatto ciò, procedere con il salvataggio del file.

Adding Code to .htaccess File WordPress

Questo codice imposta semplicemente il valore del tempo massimo di esecuzione a 300 secondi (5 minuti). Ora è possibile visitare il sito web per verificare se il messaggio di errore è stato eliminato.

Se l’errore persiste, provare ad aumentare il valore a 600.

Se questo metodo vi è stato utile, date un’occhiata ai trucchi .htaccess più utili per WordPress.

Metodo 3: Modificare il file php.ini

Un altro metodo per risolvere l’errore di tempo massimo di esecuzione superato in WordPress è modificare il file php.ini.

Il file php.ini è un file di configurazione che definisce le impostazioni di PHP sul vostro server. Su molte piattaforme di hosting WordPress, è possibile che non venga visualizzato all’interno della cartella principale.

In questo caso, potete creare un nuovo file php.ini all’interno della cartella principale di WordPress utilizzando FTP o l’applicazione File Manager.

A questo punto, è sufficiente modificare il file php.ini e aggiungere la seguente riga:

max_execution_time = 60

Non dimenticate di salvare il file e di caricare le modifiche sul server. Ora è possibile visitare il sito web e verificare se l’errore è scomparso.

Nella maggior parte dei casi, aumentando il tempo massimo di esecuzione con questi due metodi si risolve l’errore. Tuttavia, se ciò non dovesse accadere, è necessario contattare il proprio provider di hosting WordPress per ricevere assistenza.

Per ulteriori informazioni su come ottenere assistenza per il vostro sito WordPress, leggete la nostra guida su come chiedere assistenza per WordPress nel modo giusto.

Speriamo che questo articolo vi abbia aiutato a risolvere l’errore fatale: tempo massimo di esecuzione superato in WordPress. Potreste anche voler consultare la nostra guida su come risolvere l’errore di stabilire una connessione al database in WordPress e la nostra classifica dei migliori provider di hosting WordPress gestiti.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

71 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    What do you think is a reasonable maximum of this value? Sometimes some plugins, especially for import and export, need quite a lot of time before performing an action. So I would be interested in what value it is no longer good to get over, because it could mean, for example, a security risk.

    • WPBeginner Support says

      Starting with 60 is normally a good way to test and then it would depend on the specific task for how much to increase it or if the host needs to be checked with for an error.

      Admin

      • Jiří Vaněk says

        Thank you for answer. I currently have a limit of 300 and then that’s enough. So I’ll leave it at this value then we’ll see. When I put it lower, I sometimes don’t fit into the limits. Thank you. I will definitely not increase the limit then.

  3. mudasir abbas turi says

    when ever i have face with problem then i search on google i found your website and i have always solve my problem from your website thanks too much

    • WPBeginner Support says

      You would use the same method, you may want to ensure the file isn’t already created under xampp/php in which case you would want to edit the file there.

      Admin

  4. Umesh Vinayak Shejole says

    It’s working properly. I am installed premium shopping theme & got error when installing required plugins. After putting php_value max_execution_time 300 line in my .htaccess file it’s working & being installed all required plugin. I am trying from last 2 / 3hrs with this problem. Thank you for saving lot’s of time.

  5. Lyubomir says

    Thanks a lot for the great article !
    It resolved my issue – it happened on trying to upgrade my localhost WordPress installation from v.5.2.5 to v.5.3.2
    Adding the line “php_value max_execution_time 300” at the bottom of the .htaccess file proved to be enough, in my case.
    Best regards !

  6. Al-Amin Khan says

    I was very upset for this problem. After reading your article this problem has solved.
    Thank you so much.

  7. Amelia John says

    Hey Dears,
    I am getting a maximum execution time limit error like below when clicking on the woocommerce settings tab. I added max_execution_time = 360 to php.ini file however it’s not working as well.

    Deactivated every plugin by keeping woo-commerce only also changed to a default WordPress theme, none of these steps work for me.

    Any good hearts here to help me to sort out this issue?

    • WPBeginner Support says

      Reach out to your hosting provider to see if they have an overriding setting preventing you from changing the execution time for your site. That could be the likely reason

      Admin

    • Kaan Oezgiray says

      Try this in your script (I placed it on the first line and it works):
      ini_set(‘max_execution_time’, ‘600’);

      Hope it helps.

      -Kaan

  8. mubarak hassan says

    How can I solve this? Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\wp\wp-includes\Requests\Transport\cURL.php on line 163

  9. MU says

    down vote
    You have to just check whether your WAMP server is online or not.

    To put your WAMP server online, follow these steps.

    Go to your WAMP server notification icon (in the task bar).
    Single click on the WAMP server icon.
    Select last option from the menu, that is, Put Online
    Your server will restart automatically (in the latest versions only). Otherwise, you have to restart your server manually.
    And you are DONE…

  10. Waqas says

    Hi, I have been facing this issue for along time don’t know how to solve it.

    I am getting this error while visiting my homepage Warning: session_start(): open(/tmp/sess_e8717886215bae41c9c82993bd822901, O_RDWR) failed: Disk quota exceeded (122) in /home/waqas1385/public_html/example.com/wp-content/plugins/easy-contact/econtact.php on line 112

    I have searched my whole site but I don’t have this plugin ‘easy contact’ installed and I can’t find it in the file manager.

    please help me how to fix this error. Thanks

    • WPBeginner Support says

      Hi Waqas,

      Try using an FTP client and locate this folder manually. Make sure that your FTP client is set to show hidden files too.

      It seems that some poorly coded plugin is starting sessions and your server is unable to delete temporary session files. It could also be caused by a temporary files stored elsewhere like your web hosting mailboxes.

      Admin

  11. Jess says

    This didn’t work for me, now I can’t even get to the log in page and it gives an error message for my whole site :(

  12. Ahmad says

    Hi I am using php 5.5
    When i open .htaccess code editor in cpanel i see the following text
    where should i exactly add this code and save it?

    # Use PHP55
    AddHandler application/x-httpd-php55 .php

    suPHP_ConfigPath /opt/php55/lib

    # BEGIN WordPress

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

    # END WordPress

  13. Ellayararwhy says

    This doesn’t fix the underlying problem at all, which is that something running under WP is totally consuming CPU resources. To suggest that just increasing the timeout value is a fix is not good practice – focus on the root cause.This can happen in many ways (apache library, synchronous read, etc), but the usual culprits are some PHP code in some WP plug-in stuck in a very long or infinite iteration loop. Perhaps there is a weird interaction between two or more WP plugins.

    In all scenarios, including ones not discussed, is that you have to back off (disable) your WP plugins until the CPU load decreases to a reasonable value. The next step is to figure out how to track down a plugin problem or plugin interaction issue, which may involve quality time on forums focused on the suspect plugins.

    • Leo says

      I agree with @ELLAYARARWHY. The point of setting max execution time is for security and the users experience, changing the settings this way to me is only putting a patch on the issue rather then actually fixing it. Increasing the time is not a long term solution.

  14. ZS says

    I have WordPress 4.1 installed on XAMPP. I didn’t have any .htaccess files in the wp-content and wp-admin folders. I added them myself with the code you mentioned but that didn’t fix the error. I’ve also tried installing the plugin and that also did not fix the error.

    I tried running WordPress on WAMP and I am getting the error on WAMP too. I am getting this error when I try to import the Theme Unit Test XML file. What else can I do? :(

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.