Skip to main content

GuideHow to increase upload limit and other PHP limits in WordPress

Guides

Last updated: 26 October 2026

PHP, the language WordPress runs on, has limits: how big an upload can be, how much memory a page can use, how long a task may run. At MariHost the defaults suit most websites, and you can change them yourself for each website in the control panel's php.ini editor. This guide shows which limit causes which error, and how to raise it. It takes about 5 minutes.

Your limits now

New websites at MariHost start with these PHP limits:

Limit (php.ini name)DefaultWhat it controls
Upload size (upload_max_filesize)1000MThe largest file you can upload
Post size (post_max_size)1000MThe largest form or upload in one go
Memory (memory_limit)256MHow much memory one page or task can use
Time (max_execution_time)30How many seconds a task can run
Input variables (max_input_vars)1000How many fields a form can send

So uploads of up to 1 GB already work: if WordPress says a file is too big, check the other causes below first.

To see your website's own values, go to Tools → Site Health in WordPress, open the Info tab and expand Server. Media → Add New also shows the largest file you can upload.

Which limit to change

  • "Allowed memory size of … bytes exhausted", or a critical error while a big plugin works: raise memory_limit to 512M.
  • A menu, a page builder layout or a product with many variations doesn't save everything: raise max_input_vars to 3000, or 5000 for very large menus or shops.
  • An import, a backup plugin or a big update stops halfway with a timeout: raise max_execution_time to 120, or 300 at most.
  • "The uploaded file exceeds the upload_max_filesize directive" or "The link you followed has expired" when uploading: the file is over 1 GB. Raise upload_max_filesize and post_max_size together, or see "Very large files" below.

Raise only what you need. Higher limits don't make your site faster, and a runaway task with a high limit can use up your plan's memory: each website has up to 1 GB on Starter, 2 GB on Business and Agency, and 3 GB on Pro.

Increase upload limit, or change another PHP limit

1. Open Developer tools

Sign in to your client area at billing.marihost.com, open your hosting plan and click Login to Control Panel. Open Websites in the left sidebar and choose your website. Open Advanced in the top menu and choose Developer tools. In the pictures below, our test website is marihost.org.

The Advanced menu open in the control panel, with Developer tools at the bottom of the list

2. Add a directive

Scroll to php.ini editor, or click it on the left. A directive is one PHP setting. Click Add directive.

The php.ini editor in the control panel, with no directives yet and the Add directive button

3. Fill it in

  • Directive: the setting's name, exactly as in the list above, such as memory_limit.
  • Value: leave Text chosen, and type the new value, such as 512M. Sizes end in M (megabytes) or G; times are a number of seconds.

Click Create.

To increase upload limit or memory, the Add directive form with memory_limit and 512M filled in, and the Create button

A notice says "Directive added", and the directive appears in the list. It applies straight away, to this website only.

The php.ini editor listing the memory_limit directive set to 512M

Check the new limit

Back in WordPress, open Tools → Site Health → Info → Server again and check the new value. Then try what failed before.

To change the value later, click ⋮ next to the directive and choose Edit. To go back to the default, choose Delete and confirm.

Very large files

For files over 1 GB, such as a large video or a site backup, uploading through WordPress is slow and easily interrupted. Instead:

  • Upload it with the File manager (Files in the control panel) or an FTP app, straight into your website's folder.
  • Videos play better from YouTube or Vimeo, embedded in your page, than from your own hosting.
  • Using Cloudflare? Its proxy refuses uploads over 100 MB on the Free and Pro plans, whatever your PHP limits. Upload from the control panel instead, or turn the proxy off (grey cloud) for the upload.

If something's not right

Site Health still shows the old value. Check the directive's name for typos: it must match exactly, such as memory_limit, not memory-limit. Then click Restart at the top of Developer tools, to restart PHP for your website.

A plugin still says the limit is too low. Some plugins read WordPress's own memory setting. Raise memory_limit as above; you don't need to edit wp-config.php.

Your site shows a critical error after the change. Delete the directive you added, and check its value: 512M, not 512MB. The php-error.log at the top of Developer tools shows what went wrong.

Not sure which limit you're hitting? Open a ticket with the error message, and we'll look at your website's error log with you.

Next steps

While you're in Developer tools, you can also change your PHP version. Making a big change? Back up your website first.

Still hitting a limit?

Tell us your website and the error, and we'll find the right setting.