In WordPress compare la dicitura “Il link che hai seguito è scaduto”?
Questo errore non fornisce molti indizi su cosa non va, ed è per questo che i principianti di WordPress trovano difficile risolverlo.
In questo articolo vi mostreremo come risolvere facilmente l’errore “il link che hai seguito è scaduto” in WordPress. Parleremo anche delle cause di questo errore e di come evitarlo in futuro.
Cosa causa l’errore “Il link che hai seguito è scaduto”?
L’errore ‘Il link che hai seguito è scaduto’ si verifica di solito quando si cerca di caricare un tema WordPress o un plugin di dimensioni superiori ai limiti di dimensione dei file stabiliti dal provider di hosting WordPress.
Ecco come si presenta il messaggio:
Le società di web hosting controllano le dimensioni dei file che è possibile caricare su WordPress per migliorare le prestazioni complessive del server web. I file di grandi dimensioni possono rendere il vostro sito web instabile o lento.
È possibile vedere il limite di dimensioni del file caricato visitando la pagina Media ” Aggiungi nuovo dalla dashboard di WordPress.
Detto questo, se queste impostazioni sono troppo basse o se si sta cercando di caricare un file di dimensioni maggiori, si possono verificare errori come l’errore di memoria esaurita o l’errore di tempo massimo di esecuzione superato.
E se state cercando di caricare un tema o un plugin di WordPress, l’errore che vedrete è “Il link che avete seguito è scaduto”.
Tenendo conto di ciò, vediamo come risolvere facilmente questo problema.
Correzione dell’errore “Il link che hai seguito è scaduto”.
Il modo più rapido per risolvere il problema “Il link che hai seguito è scaduto” è quello di aumentare le dimensioni di caricamento dei file, la memoria PHP e i limiti di tempo di esecuzione per il vostro sito WordPress.
Esistono diversi modi per farlo. Ve li mostreremo tutti e potrete scegliere quello che vi sembra più semplice e che funziona nel vostro ambiente di hosting.
Potete utilizzare i collegamenti rapidi qui sotto per passare al metodo che desiderate utilizzare:
Metodo 1: Aumento dei limiti con WPCode (consigliato)
Aumentare i limiti nel file functions.php può essere facile, ma questo metodo ha uno svantaggio. Il sito tornerà ai vecchi limiti se si cambia o si aggiorna il tema di WordPress.
Per questo motivo si consiglia di utilizzare WPCode.
WPCode è il miglior plugin di gestione del codice per WordPress che consente di aggiungere frammenti di codice in qualsiasi punto del sito web senza modificare i file del tema come functions.php. In questo modo, tutte le personalizzazioni effettuate non andranno perse quando si aggiorna o si cambia il tema.
Per prima cosa, è necessario installare e attivare WPCode. Per maggiori dettagli, consultare la nostra guida per principianti su come installare un plugin di WordPress.
Una volta attivato il plugin, basta andare su Code Snippets ” Add Snippet dall’area di amministrazione e cliccare su “Add Your Custom Code”.
Assicurarsi di selezionare “Snippet PHP” dal menu a discesa “Tipo di codice” e quindi inserire il codice nella casella “Anteprima codice”:
@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );
In questo codice, abbiamo aumentato i limiti a 120 megabyte per le dimensioni di upload e post e il tempo di esecuzione a 300 secondi.
Si consiglia di regolare i valori di upload_max_size
e post_max_size
in modo che siano superiori al file che si sta cercando di caricare. Si può anche aumentare il max_execution_time
al tempo che si ritiene necessario per il caricamento del file.
Infine, è necessario attivare lo snippet di codice per renderlo attivo sul sito web.
Per maggiori dettagli, consultare la nostra guida su come aggiungere facilmente codice personalizzato in WordPress.
Metodo 2: Aumentare i limiti nel file .htaccess
Un altro modo per aumentare i limiti delle risorse PHP è modificare .htaccess, un file fondamentale di WordPress. Potete farlo con un client FTP o con l’applicazione File Manager di cPanel.
È sufficiente collegarsi al sito web tramite FTP e individuare il file .htaccess nella cartella principale o public_html. Quindi, aprirlo per modificarlo con un editor di codice.
Ora è necessario aggiungere le seguenti righe di codice in fondo al file .htaccess:
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
Come per il metodo precedente, è possibile regolare i valori in modo che siano superiori al file che si sta cercando di caricare.
Infine, non dimenticate di salvare le modifiche e di caricare il file sul vostro sito web.
Metodo 3: Aumentare i limiti nel file php.ini
Il file php.ini è un file di configurazione utilizzato da PHP e WordPress. È necessario collegarsi al sito WordPress utilizzando un client FTP e cercare il file php.ini nella directory principale del sito.
La maggior parte degli utenti ha un account di hosting condiviso, quindi potrebbe non trovare questo file nella cartella principale del sito. In questo caso, è necessario creare un file php.ini vuoto utilizzando un editor di testo semplice come Notepad e caricarlo sul proprio sito web.
Ora, modificare il file php.ini e aggiungere il seguente codice al suo interno:
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
Non dimenticate di salvare le modifiche e di caricare il file sul vostro sito web.
Ora è possibile visitare il sito Web e provare a caricare nuovamente il file del tema o del plugin. L’errore dovrebbe scomparire e si dovrebbe essere in grado di caricare il file.
In caso contrario, provare il metodo successivo.
Metodo 4: Aggiornare la versione di PHP
Oltre ai metodi precedenti, l’aggiornamento della versione PHP può potenzialmente risolvere l’errore “Il link che hai seguito è scaduto” in WordPress. Infatti, una versione PHP non aggiornata può causare problemi di compatibilità, che potrebbero portare a questo errore.
Per eseguire questa operazione in modo sicuro per il vostro sito web, consultate la nostra guida su come aggiornare la versione di PHP in WordPress.
Se tutti i metodi sopra descritti non funzionano, potrebbe essere necessario contattare il vostro provider di hosting WordPress per verificare se il problema è da imputare a loro. Se è la prima volta che chiedete assistenza per WordPress, leggete la nostra guida su come ottenere assistenza per WordPress nel modo giusto.
Speriamo che questo articolo vi abbia aiutato a risolvere facilmente il problema “Il link che hai seguito è scaduto” in WordPress. Vi consigliamo anche di inserire tra i preferiti la nostra guida su come risolvere gli errori più comuni di WordPress e di dare un’occhiata alle scelte dei nostri esperti sui migliori plugin WordPress per far crescere il vostro sito.
Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.
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!
Syed Shan Shah says
Nothing worked for me.
WPBeginner Support says
If none of the methods from our guide were able to assist then we would recommend reaching out to your hosting provider to ensure they don’t have a setting on their end that is overriding your attempts.
Admin
Kevin says
What worked for me was to create a .user.ini file in the public_html folder and put the code mentioned above for php.ini
WPBeginner Support says
It would depend on how your server is set up as not all servers allow user.ini but that is good to know for servers that do
Admin
Jiří Vaněk says
Editing limits using the .user.ini file also works on Linux. The directives are very similar. Some providers also prefer the user.ini file to the .htacess file. Thanks for the great video. In the end, it helped me to raise the limits only through the mentioned .user.ini.
WPBeginner Support says
You’re welcome
Admin
Steve says
Doesn’t work. I’ve run into this before and got it to work but it was awhile back. searched Google and found these instructions but they don’t work for my site.
WPBeginner Support says
If none of the methods in our guide were able to help you, please reach out to your hosting provider and they should be able to assist.
Admin
Shane O'Sullivan says
I am running WordPress on my iMac at localhost:8888 but changing the sizes in wpcode made no difference. After editing the htaccess file, I was able to upload the theme, so cheers
WPBeginner Support says
Glad to hear you were able to solve the issue!
Admin
Himesh says
I followed every single step as mentioned to work around the problem of uploading a theme to wordpress when upload limit was too low. Used the WP Code Snippet to increase the limits and still the same message: “link expired”
WPBeginner Support says
If our recommendations do not work for you, please reach out to your hosting provider and they should be able to assist with this issue.
Admin
Gabriel says
I am using GCP.
It works only after modifying php.ini under fpm, and restart php-fpm
Modifying .htaccess would lead to internal server error.
WPBeginner Support says
Thank you for sharing what worked for you!
Admin
Gary says
I tried 3 methods all. But the limit value was not changed.
On the ‘Add New’ page from ‘Media’, the Maximum upload file size is still 2MB.
Do I need to restart service or something?
Please help me.
WPBeginner Support says
Your hosting provider may be overriding the max file size, if you check with your host they should be able to assist!
Admin
Michael Douglas says
Thanks for the help. This took care of the issue for me.
WPBeginner Support says
Glad our guide was helpful!
Admin
Bernard says
Very helpful thank you.
WPBeginner Support says
You’re welcome!
Admin
Ry says
Thank you!
Used .htaccess method.
WPBeginner Support says
You’re welcome, glad that our recommendations were able to assist!
Admin
Syed Nauman Sajid says
Brilliant and perfectly worked for me.
WPBeginner Support says
Glad our guide could help!
Admin
Bob says
People should check their settings. I left the M off from 128M. Really stupid but that was my issue.
WPBeginner Support says
Everyone can make a typo like that but we’re glad you were able to find and solve the issue for you
Admin
Art Bejarano says
I’m having an issue: I’ve added the htaccess text at the end and it did not work. I removed any formating on the text and it still did not work. I need help.
Ann says
I tried all the steps but I still have the issue. I have the issue every time I click on save/submit. For example, update WordPress version. Enable debug mode in Elementor. Disable all plugins.
Please help to let me know how can I fix it, please.
Anurodh Keshari says
In my dashboard Maximum upload file size is 512 MB. but still, I’m facing this issue but I’m facing this issue while deactivating the plugin… can you help me…
WPBeginner Support says
You would want to check with your hosting provider to ensure they are not overriding any of your changes.
Admin
Cesar Puente says
This guide helped me a lot. I had this problem with local WordPress. I couldn’t upload my customize theme to test it.
Thank you so much.
WPBeginner Support says
Glad our recommendations were able to help
Admin
Akin says
Method 2 worked for me like charm. Thank so much for this.
WPBeginner Support says
Glad our recommendation helped you
Admin
Carly says
Worked perfectly – thanks so much!
WPBeginner Support says
Glad our guide was helpful
Admin
Tasmim says
Really good suggestion. works really fine now
WPBeginner Support says
Glad our recommendation helped
Admin
elijah says
which location should i post the method one which line
WPBeginner Support says
We would recommend taking a look at our guide below for understanding how to paste snippets:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/
Admin
Tudor says
It worked, thank you!
WPBeginner Support says
Glad our guide was helpful
Admin
Andri says
Thanks very much Method 3 worked.
But, Server error when I edit the .htaccess file and Adding to functions.php doesnt work.
WPBeginner Support says
Glad our guide was helpful, if any of the methods don’t work then we would recommend checking with your host as those are settings that may be getting ignored due to server settings.
Admin
Rush says
Thanks for help!
WPBeginner Support says
You’re welcome
Admin
Khan says
METHOD 2 worked perfectly.
I was trying to install the elegant theme
Thanks Brother!
WPBeginner Support says
Glad our guide could help
Admin
Theo says
Thank you, that was most helpful. I modified .htaccess.
WPBeginner Support says
Glad our guide was able to help
Admin
Nathan says
I get a 500 Internal Server error when I edit the .htaccess file. How do I add the code without getting this error. Adding to functions.php doesnt work for me
WPBeginner Support says
Some workarounds for that specific error message can be found in our article below:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/
Admin
Ravi says
Many thanks, your method 2 worked for me on 04-JULY-2020. I have added following code before the tag:
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
WPBeginner Support says
Glad our recommendation was helpful
Admin
James Voufo Safor says
Thank you so much. This really worked!
I followed the second method and now I have the theme installed.
Keep doing what you do.
WPBeginner Support says
Glad our guide could help
Admin
kwaku Vesper says
thanks very much it worked
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
Waqar says
Did all these methods but still getting the error
Don’t know what else to do
WPBeginner Support says
You may want to reach out to your hosting provider to ensure they’re not overriding the changed you’re making and that they don’t see any errors from their end.
Admin
Steve says
Sadly this explanation does not indicate in which folder the php.ini should be located/placed
WPBeginner Support says
Apologies if our explanation was not clear, the php.ini should be in your site’s root folder.
Admin
Mark Ferguson says
I have a client having this issue but only on the woocommerce login form. If you click link to try again it works. Any ideas?
WPBeginner Support says
If the methods in this article and resaving your permalinks does not fix the issue, you would want to reach out to WooCommerce for assistance.
Admin