Increase WP Memory Limit & PHP Max Input Vars

I need assistance with increasing the WP Memory Limit to 96MB and increase the PHP Max Input Vars to 3000 on my Wordpress website.

  • Adam Czajczyk

    Hello Lauren,

    I hope you're well today and thank you for your question!

    In order to increase WordPress Memory Limit please follow these steps:

    - access your site via FTP or cPanel's "File Manager" tool
    - edit the "wp-config.php" file
    - inside that file add following line

    define( 'WP_MEMORY_LIMIT', '96M' );

    This line should be located above the "/* That's all, stop editing line... ", preferably right above it.

    As for increasing PHP max_input_vars. There are several ways to do it. First one to check would be to login to your server's cPanel and look there for PHP settings. Often there's an option to edit PHP settings "per host" or "per domain" and you may find it there.

    If there's no such option:

    - create a file named "php.ini"
    - put following line inside

    max_input_vars = 3000;

    - save the file and upload it to your server to the root (main) folder of your domain

    On some servers it's not possible to use "php.ini" file that way so if above doesn't work, there's another way to check:

    - edit the ".htaccess" file of your site
    - add following lines at the very top of it (do not remove anything that's already there)

    php_value max_input_vars 3000

    - save the file.

    If that doesn't work either or breaks the site, edit the file again to remove the line and get in touch with your host asking them if they could increase that value for you.

    If you have any additional questions, let me know please.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Lauren!

    I found this little video that should help you with CuteFTP:

    https://www.youtube.com/watch?v=_KFra7lqEAA

    As for logging in. The main FTP login and password may be different than the one you are using to login to your Hostgator hosting account. If you do not know the proper login credentials you may want to turn to Hostgator support for help and they should be able to assist you with this.

    I'm suggesting that because if I was to help you I would need the proper FTP login and password to so since the ones you tried didn't work for you, I wouldn't be able to access your site too. Therefore the first step is to find out about the right login and password and that is something that only host can help you with.

    Once you got your hands on it, let me know if you are able to handle the changes that I suggested in my previous post and in case you needed further assistance, I'll be ready to help.

    Kind regards,
    Adam