最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】WordPress上传zip的主题文件失败:The link you followed has expired

上传 crifan 1340浏览 0评论
折腾:
【未解决】Wordpress中安装和配置Enfold主题
期间:
直接去上传已有的一个enfold的wordpress主题文件:
结果出错:
The link you followed has expired.
难道必须购买才能安装使用?
Where Is My Purchase Code? – Envato Market Help Center
wordpress theme install The link you followed has expired
Topic: The link you followed has expired. | WordPress.org
https://wordpress.org/support/topic/the-link-you-followed-has-expired/
Topic: Error “The link you followed has expired.” | WordPress.org
https://wordpress.org/support/topic/error-the-link-you-followed-has-expired/
感觉好像应该和php文件上传大小的限制应该没关系吧?
Topic: Showing error “The link you followed has expired.” | WordPress.org
https://wordpress.org/support/topic/showing-error-the-link-you-followed-has-expired/
Topic: Export TablePress | WordPress.org
https://wordpress.org/support/topic/export-tablepress/
Topic: The link you followed has expired. Please try again. | WordPress.com Forums
https://en.forums.wordpress.com/topic/the-link-you-followed-has-expired-please-try-again/
Topic: The link you followed has expired. | WordPress.org
https://wordpress.org/support/topic/the-link-you-followed-has-expired/
“Nevermind. I found it. The ‘upload max.file size’ was set to 2Mb while I was trying to upload a 8Mb file. Changed it and worked.”
还是去修改默认上传文件大小限制
http://localhost:8888/MAMP/?language=English
中和配置:
都没找到php.in是在哪里的。
算了,去找mamp的位置,估计就能找到了。
找到位置了:
/Applications/MAMP/bin/php/php7.2.1/conf/php.ini
去修改:
; Maximum execution time of each script, in seconds
; 
http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
; max_execution_time = 30
max_execution_time = 300

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; 
http://php.net/post-max-size
; post_max_size = 8M
post_max_size = 200M

; Maximum allowed size for uploaded files.
; 
http://php.net/upload-max-filesize
; upload_max_filesize = 32M
upload_max_filesize = 200M
重启试试,结果:
果真就可以了:
【总结】
wordpress此处通过上传zip去安装主题,结果失败:
The link you followed has expired
原因是:
此处Mac中默认安装的MAMP的php中默认文件大小有限制,此处应该是zip超出限制了。
去修改php.ini
此处Mac中MAMP的php.ini的位置是:
/Applications/MAMP/bin/php/php7.2.1/conf/php.ini
其中php下面有多个版本:
具体所使用哪个版本,是通过MAMP的配置中看出来的:
然后去修改上传文件大小限制,
(后来看到了:
/Applications/MAMP/logs/php_error.log
中的:
[14-Jul-2018 14:59:59 UTC] PHP Warning: POST Content-Length of 16434940 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
表示的确是上传zip文件大小超过post_max_size的默认的8M的限制了)
顺带也去修改超时限制:
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
; max_execution_time = 30
max_execution_time = 300

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
; post_max_size = 8M
post_max_size = 200M

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
; upload_max_filesize = 32M
upload_max_filesize = 200M
(然后重启此处Mac中的MAMP,重新上传)即可。

转载请注明:在路上 » 【已解决】WordPress上传zip的主题文件失败:The link you followed has expired

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.193 seconds, using 22.17MB memory