How to Change PHP Settings (memory_limit, upload_max_filesize)

If WordPress says "The uploaded file exceeds the upload_max_filesize directive", a plugin runs out of memory, or an import times out, you need to change your PHP settings. This guide shows how to change PHP settings like memory_limit and upload_max_filesize for your Instant Access Internet Services site in cPanel with the MultiPHP INI Editor, and which values to use.

How to change PHP settings in cPanel

  1. Log in to cPanel and go to Software > MultiPHP INI Editor.
  2. Stay on the Basic Mode tab.
  3. Under Configure PHP INI basic settings, choose your domain from the menu. The list of settings and their current values appears.
  4. Change the values you need. On/off settings have a toggle; sizes and times have a text box (for example type 256M for memory_limit).
  5. Click Apply at the bottom of the page.
  6. Reload your website and check the change has taken effect.

Choosing your domain changes the settings for that website. The editor saves them in your site's folder (in php.ini, .user.ini and, where supported, .htaccess), so don't delete those files unless you want the defaults back. If you have a site in a subdomain, choose it separately.

The PHP settings people change most

SettingWhat it controlsDefault / typical value
memory_limitThe most memory one PHP script can use. Too low causes "Allowed memory size exhausted" errors.Default 128M; 256M suits most WordPress and WooCommerce sites
upload_max_filesizeThe largest single file that can be uploaded through your website.Default 64M; raise to 128M or 256M if needed
post_max_sizeThe largest total form submission, including all uploaded files. Must be the same as or larger than upload_max_filesize.Same as or a bit above upload_max_filesize
max_execution_timeHow many seconds a script may run before it's stopped.60 to 300
max_input_timeHow long a script may spend receiving uploaded data.Same as max_execution_time
max_input_varsHow many form fields can be sent at once. Too low breaks large menus and page-builder saves.3000 to 5000
display_errorsWhether PHP errors are shown on the page to visitors.Off on a live site

The exact list in Basic Mode depends on the PHP version your site uses.

How to increase the maximum upload size

To raise the upload limit (for example in the WordPress Media Library or when importing a theme or backup), change both of these, or the smaller one still wins:

  1. Set upload_max_filesize to the size you need, for example 128M.
  2. Set post_max_size to the same or a larger value, for example 128M.
  3. For large imports, also raise max_execution_time and max_input_time to 300.
  4. Click Apply.

In WordPress, go to Media > Add New Media File and check the "Maximum upload file size" shown on that page.

How to increase the PHP memory limit

Set memory_limit to 256M (or 512M for large shops or page builders) and click Apply. A higher PHP memory limit can't give a script more memory than your account's overall limit shown in Metrics > Resource Usage, so very high values don't help and may hide a badly behaved plugin. For WordPress, the plugin or theme's own documentation usually tells you the value it needs.

Editor Mode (advanced)

The Editor Mode tab lets you edit the php.ini file for a domain as plain text, for settings that aren't in Basic Mode. Only use it if you know the exact directive you need, and make one change at a time. A typing mistake can stop your site loading; if that happens, undo the change or open a ticket.

Troubleshooting

I changed a setting but nothing happened

  • Check you chose the right domain in Configure PHP INI basic settings and clicked Apply.
  • Look in your site's folder for php_value lines in .htaccess or an old php.ini copied from a previous host or plugin with conflicting values.
  • WordPress plugins and wp-config.php can set their own limits (for example WP_MEMORY_LIMIT).
  • Allow a minute or two for the change to take effect. If it still doesn't apply, open a ticket.

The setting I need isn't in the list

Try Editor Mode, or open a ticket and tell us which setting and value you need, and why.

How do I check my current PHP settings?

The Basic Mode page shows the current values for the domain you choose. In WordPress, you can also go to Tools > Site Health > Info and expand Server.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • increase upload_max_filesize cpanel, increase php memory limit, multiphp ini editor, change php settings cpanel, max_execution_time cpanel, post_max_size
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Change Your PHP Version in cPanel

Running a current PHP version keeps your website faster and more secure, and many WordPress...

How to Set Up a Cron Job in cPanel

A cron job runs a command or script on a schedule, such as every hour or once a night, without...

How to Check Your Website Error Log and Recent Visitors

When your website shows a blank page, a "500 Internal Server Error" or a feature just stops...

How to View Website Statistics with AWStats and Bandwidth

Your Instant Access Internet Services hosting account includes built-in website statistics, so...

How to Use SSH, SSH Keys and Terminal in cPanel

SSH gives you a command line on your Instant Access Internet Services hosting account, which is...