wordpress上传主题413报错的解决方案

一· 处理413 Request Entity Too Large

这个是nginx上传文件的大小限制,可以在nginx配置文件中改一下

打开你的nginx主配置文件nginx.conf 修改client_max_body_size的值,我这里修改成了100m

server {
    listen       80;
    server_name  网址;
    location / {

        root /usr/share/nginx/html/wordpress;
        index index.php index.html index.htm;
        client_max_body_size    100m;
   }

   location ~ \.php$ {
        root    wordpress目录地址;
        client_max_body_size    100m;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }
}
# 重载nginx
nginx -s reload 

二· 处理uploaded file exceeds the upload max filesize

nginx配置改完以后还有会出如下错误,uploaded file exceeds the upload max filesize,这个是php上传文件限制,可以在php.ini文件改一下

找到post_max_size改成150M

找到upload_max_filesize改成100M

另外说明: post_max_size的值略大于upload_max_filesize的值比较好

修改完后重启php-fpm

要是还不行,就chmod 777 -r /usr/share/www/html/wp-content

觉得有帮助可以投喂下博主哦~ 一分也是爱!感谢!
转载请注明文章地址及作者哦~
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇