WordPress knowledge sharing

The uploaded file exceeded the upload_max_filesize direct in php.ini

A few days ago, Weieis Blog tested the wordpress template locally with the Windows 7 system Phpstudy builds a local php environment When uploading the template, I encountered the following prompt: The uploaded file exceeds the upload_max_filesize direct in php.ini, which roughly means that the size of the uploaded file exceeds the maximum value in php.ini. I installed the English version of wordpress. If you install the simplified Chinese version of wordpress, the prompt should be: the size of the uploaded file exceeds the upload_max_filesize value defined in php.ini. The solutions are as follows:

1、 Php. ini modification process of windows

1. By default, phpstudy is installed on disk D. First, check the version of php used in the software. For example, I use php-5.4.45, and then go to disk D to find the folder of this version.

2. Open the php.ini file in Notepad, search for upload_max_filesize and post_max_size, and change the maximum file upload limit, for example, to 32M, which is larger than the file you want to upload.

3. Restart the Apache service, that is, the restart button on the software.

2、 Linux php. ini modification method

If you encounter the prompt "The size of the uploaded file exceeds the upload_max_filesize value defined in php.ini" when uploading Avada themes, and it is a Linux system, you can modify it according to the following method.

The php.ini path of centOS7.3 is/ect/php.ini, while that of centOS6.8 is/usr/local/php/etc. Download it with SFTP software, and search upload_max_filesize and post_max_size with code editing software such as dreamweaver or EditPlus. The Avada theme is 5M by default, and both can be changed to 8M or 10M. In fact, it only needs to be a little larger than the file you want to upload.

Remember to restart the PHP service after modification. PHP-FPM restart command:

/etc/init.d/php-fpm restart

If you cannot find this command, restart the server.

3、 Pagoda panel php.ini modification method

Once you have written an article, please move on What to do if the upload file in the PHP environment exceeds the capacity limit

Now you can upload again. If the size of the uploaded file from WordPress exceeds the upload_max_filesize value defined in php.ini, the above method can be used to solve the problem.

Like( one )
Article name: The uploaded file exceeded the upload_max_filesize direct in php.ini
Article link: https://www.vpsss.net/2679.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.