WP post max size is the maximum size of allowed post data. This size also affects file upload. The default post max size for WordPress is 32MB. If you want to upload a file that exceeds 32MB, then it will be prudent for you to increase your maximum post size. Generally speaking, uploading large files requires this value to be greater than upload max size but less than memory limit.
How to increase WP post max size
The recommended WordPress maximum post size is 64MB.
a. functions.php
- Open your theme files and locate the functions.php file. You can contact your theme developer for assistance if required.
- Locate the line that has; @ini_set( ‘post_max_size’, ’32M’);. If you can’t find that line, you can simply add it.
- Change the post max size from 32M to 64M.
- Save the functions.php file then refresh your website.
b. php.ini
- Locate the php.ini file. If you cannot find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation. Using cPanel or FTP/SFTP, go to File Manager > public_html.
- Locate the .php.ini file under the public_html folder, right click on it and select the “Edit” option.
- Locate the line that has; post_max_size = 32M. If you created your own php.ini file, ensure you add the line.
- Change the post max size from 32M to 64M.
- Save the php.ini file then refresh your website.
Some shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.
c. .htaccess
- Locate the .htaccess file in the root directory of your WordPress installation. If you can’t find it then it might be hidden. Make sure to check your hidden files when locating it. Using cPanel or FTP/SFTP, go to File Manager > public_html.
- Locate the .htaccess file under the public_html folder, right click on it and select the “Edit” option.
- Locate the line that has; php_value post_max_size 32M. If you can’t find that line, you can simply add it before the # END WordPress line.
- Change the post max size from 32M to 64M.
- Save the .htaccess file then refresh your website.