WordPress installations can be confusing at times, and when combined with the PHP environment in which they reside, uploading can be one area that causes quite a bit of confusion.

To give an example, recently a client asked for a solution to the following problem:

I’m moving my website to be part of a WordPress Multi-Site and I would like to import my posts and pages, but the file limit is too small. It tells me there is an 8MB limit for the import, and my XML file is over 32MB.

Thankfully, the solution isn’t too difficult, but it’s a two pronged method.

1. Multi-site works slightly different to vanilla WordPress, and your first point of call is My Sites > Network Admin > Dashboard

2. From there, click the Settings option in the left navigation and select Network Settings.

3. At the bottom, there is a Max upload file size option. Set it to 50MB (which covers the 32MB required) and click Save Changes.

Web-Development-WordPress-File-Limit

For some, this may do the trick, but you’re also susceptible to the PHP environment settings. If your maximum upload size still isn’t high enough and is less than the 50Mb you just selected, your PHP settings are controlling the limit.

In this case, you must do the following:

1. Create a file, named php.ini with a text editor such as notepad.

2. Inside the file, add the following:

post_max_size = 50M
upload_max_filesize = 50M
memory_limit = 128M
max_execution_time = 200
max_input_time = 200

3. Upload the file to your root/wp-admin/ folder.

And that’s all you should need.