In today's digital ecosystem, WordPress is confirmed as one of the most popular platforms for website creation, and Elementor stands out as one of its most effective plugins for page design. However, in order to ensure that both work to their full potential, it is crucial to understand the importance of proper server configuration, particularly with regard to the imput_vars
at PHP.
What is imput_vars in PHP?
In the PHP programming language, imput_vars
is a configuration directive that determines the maximum number of input variables that can be accepted. These variables include _GET, _POST, e _COOKIE. This limit was introduced to improve the security and efficiency of the server, preventing attacks of the type Denial of Service (DoS) that exploit the overload of input variables.
Why is it Important for WordPress and Elementor?
WordPress and Elementor, being complex web applications, make extensive use of forms, settings and functionalities that require multiple data submissions. When you create or edit pages with Elementor or customise your WordPress site, you send a lot of data to the server. If the limit of imput_vars
is set too low, the server may not be able to process all this data. This may result in problems such as:
- Theme or plugin settings not saving correctly.
- Failure to load or save complex layouts in Elementor.
- Limitations on site customisation and content management.
How to Optimise imput_vars for WordPress and Elementor
- Checking the Current Value: The first step is to identify the current value of the
imput_vars
. You can do this by creating a PHP file with the following code and uploading it to your server:
phpinfo();
By accessing this file via a browser, you can search for
imput_vars
and check the current value. - Edit File
.htaccess
ophp.ini
: To increase the limit, you can edit the.htaccess
adding:php_value max_input_vars 3000
Or, if you have access to the
php.ini
, modify the line:max_input_vars = 3000
Choose a value you consider appropriate for your needs. Usually, 3000 is a good starting point.
- Contact Your Hosting Provider: If you are not comfortable making these changes or if the changes have no effect, you may need to contact your hosting provider. Many providers have restrictions on configuration files that you can modify directly.
- Test the Modifications: After increasing the limit, test the site to ensure that everything works properly. Check the ability to save complex settings and use Elementor without any problems.
How to set max_input_vars in Plesk
Set the value of max_input_vars in Plesk is a simple and straightforward process, thanks to the intuitive graphical interface offered by the platform. If you manage your WordPress and Elementor site via Plesk, follow these steps to adjust the max_input_vars
to your needs:
- Log in to the Plesk Control Panel: First step, log in to your Plesk account. In the main dashboard, you will find a list of your websites.
- Find PHP Settings: Select the site for which you wish to change the PHP settings. On the next screen, look for the 'PHP Settings' section. This will take you to a page where you can customise various PHP configurations for your site.
- Edit max_input_vars: Scroll down the list of directives until you find max_input_vars. Here, you will see the current value. To change it, enter the new value you wish to set. As mentioned earlier, a value of 3000 is often recommended for sites using WordPress and Elementor, but feel free to adapt it to your specific needs.
- Apply Changes: After entering the new value, scroll to the bottom of the page and click 'Apply' or 'OK' to save the changes. This will update the PHP configuration for your site.
- Check Modifications: It is always good practice to check that changes have been applied correctly. You can do this by following the method described above to check the value of max_input_vars via a PHP file containing phpinfo(); or by contacting the technical support of your hosting.
Set up correctly max_input_vars
through Plesk can help prevent data loss problems in forms or when customising your WordPress site with Elementor. Be sure to test your site after making this change to confirm that everything works as expected.
Conclusions
The correct configuration of the imput_vars
in PHP is essential to ensure that WordPress and Elementor run smoothly. An inadequate setup can lead to frustrations and limitations in the management of your site. By following the steps outlined above, you can optimise your hosting environment to take full advantage of the potential of WordPress and Elementor, improving the performance and user experience of your site.
Remember, each website has different requirements; therefore, you may need to experiment with different values of imput_vars
to find the optimal setting for your specific case. Good optimisation!