After the installation of WordPress on the server, the use of the process found that the upload attachment size has a limit of 2M
The server is native, you can drag files directly to the Attachment storage folder, and then refer to the link where the attachment is needed
But this backward method is not the way, or should modify the size limit, the use is convenient.
Search in the net, there are a lot of methods, but most of them are incomplete information of the repetition, the following said my last change method, for reference only.
Server version is: Windows Server 2003 SP2
WordPress Erection: Iis+php+mysql
1, first build a info.php file in the root directory of the website
For example: D:\wwwRoot\wp This is the root directory of the site, in this directory, create a new TXT document, enter the following code, and then save as info.php
1 <?php
2 echo phpinfo ();
3?>
Then access the file in the browser, for example: http://localhost/info.php
The purpose of this step is to: View the location of the php.ini on this server + view the default attachment size information
Modify the php.ini, but the premise is to modify the correct position of the php.ini, or even if php.ini changed tens of thousands of times will not have effect
Because if you do not buy space but build it yourself, there may be multiple php.ini without modifying the correct location php.ini
We've seen PHP.ini's position is C:\WINDOWS\php.ini.
2. Modify the php.ini found in the first step
Open php.ini with WordPad
Search: Memory_limit, Post_max_size, Upload_max_filesize, Max_execution_time, Max_input_time
The general default setting value is:
memory_limit=128m//equivalent to a single script callable memory size
post_max_size=8m//upload file size limit
UPLOAD_MAX_FILESIZE=2M//default upload file size, this is the 2M limit!
MAX_EXECUTION_TIME=30//Max Execution time, page wait time
MAX_INPUT_TIME=60//MAX input time? Specific meaning is not clear, is the upload time-related
Then change it to the value you want, for example:
memory_limit=128m
post_max_size=12m
upload_max_filesize=10m//This can be changed to 10M or less files.
Max_execution_time=60
Max_input_time=60
3. Restart the IIS service
This is very important, do not restart, the above changes will not be effective
Restart the method, Start menu, run, enter: iisreset, you can
If you use Php+apache+mysql, you need to restart the Apache service.
4. Verify the effect of the modification
After 3 steps above, you can see that the corresponding information has been updated info.php
You can see the above is the modified information, as for the pre-modification (the default 2M size) here will not.
Modify the upload attachment 2M size limit method in wordpress/php+iis upload attachment Default Size modification method