PHP Warning: Content-Length Exceeds Limit
When attempting to upload an import in WordPress on a local XAMPP dev environment, users may encounter the error:
Warning: POST Content-Length of [bytes] exceeds the limit of [bytes] in Unknown on line 0
Despite increasing the upload_max_filesize value to 1000M, the issue persists.
Solution:
The error indicates that the maximum post size allowed by PHP is exceeded. The default limit is 8M, which is 8388608 bytes. To resolve this, the post_max_size value must be increased in the php.ini file.
upload_max_filesize controls the maximum size of individual files that can be uploaded, while post_max_size specifies the maximum total size of the data that can be submitted via a POST request.
Therefore, the post_max_size value must be set larger than the combined size of all uploaded files.
Steps:
The above is the detailed content of Why Does My WordPress Import Fail with a \'POST Content-Length Exceeds Limit\' Warning, and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!