简体   繁体   English

消失的WordPress菜单

[英]Disappearing WordPress Menu

The problem that it is reaching the custom menu items limit. 它已达到自定义菜单项限制的问题。 Anything it saves after he reached the menu item limit, not save. 他达到菜单项限制后会保存任何内容,而不是保存。

I tried to put this code in php.ini (root folder and wp- admin) , but nothing works . 我试图将此代码放入php.ini(根文件夹和wp-admin),但没有任何效果。

max_input_vars = 3000;
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000

phpinfo: phpinfo:

Directive / Local Value / Master Value 指令/地方价值/主价值

max_input_vars 5000 1000 max_input_vars 5000 1000

suhosin.post.max_vars 1000 1000 suhosin.post.max_vars 1000 1000

suhosin.request.max_vars 1000 1000 suhosin.request.max_vars 1000 1000

1) Editing the .htaccess file. 1)编辑.htaccess文件。 The first method you could try is to edit the .htaccess file which is stored in the home directory of your WordPress installation. 您可以尝试的第一种方法是编辑.htaccess文件,该文件存储在WordPress安装的主目录中。 You'll have to connect to your FTP account using some FTP client like FileZilla. 您必须使用FileZilla等FTP客户端连接到FTP帐户。 Once you connected, open .htaccess file and add the following code snippet: 连接后,打开.htaccess文件并添加以下代码片段:

php_value max_input_vars 5000 php_value max_input_vars 5000

From here you can increase the max_input_vars limit from 1000 to 5000, which will allow your menu items limit in WordPress to increase automatically. 从这里可以将max_input_vars限制从1000增加到5000,这将使WordPress中的菜单项限制自动增加。 You can also try to increase the value from 5000 to 7000 or more if the limitations persist, however – another reason they may persist is because the PHP server is not responding to your code entry, and in that case you could try to use the solution number two. 如果限制仍然存在,您也可以尝试将值从5000增加到7000或更多,但是-限制可能存在的另一个原因是因为PHP服务器没有响应您的代码输入,在这种情况下,您可以尝试使用解决方案第二。

2) Editing PHP.INI file. 2)编辑PHP.INI文件。

Editing the Php.ini file is the same thing as with the .htaccess. 编辑Php.ini文件与.htaccess文件相同。 You need to locate your PHP.ini file on your server via FTP and add the following lines of code: 您需要通过FTP在服务器上找到PHP.ini文件,并添加以下代码行:

suhosin.post.max_vars = 5000 suhosin.request.max_vars = 5000 suhosin.post.max_vars = 5000 suhosin.request.max_vars = 5000

or this: 或这个:

max_input_vars = 5000 max_input_vars = 5000

Note : restart the server if necessary. 注意:如有必要,请重新启动服务器。 if you are working with php.ini 如果您正在使用php.ini

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM