How to fix the uploaded file exceeds the upload max filesize directive in php ini

Опубликовано: 09 Апрель 2026
на канале: Frank Uwora
86
1

Have you ever tried uploading a WordPress theme or plugin only to see this error?

“The uploaded file exceeds the upload_max_filesize directive in php.ini.”

And when you go looking for the php.ini file, you can’t even find it?
Don’t worry — I’ll walk you through a quick fix in just a few minutes.

Steps to Create and Add a php.ini File in WordPress:

In cPanel, go to Files → File Manager.

Inside the public_html folder, click + File (top-left corner).

Name the new file php.ini and hit Save.

Locate the php.ini file you just created, right-click it, and select Edit.

Paste the following code inside:

memory_limit = 256M
upload_max_filesize = 200M
post_max_size = 50M
max_execution_time = 300


Click Save Changes (top-right corner).

Back in cPanel, scroll down and locate the PHP Processes section.

Click Kill Processes to refresh PHP.

That’s it! You can now upload themes or plugins up to 200MB.
👉 If you need a higher limit, just increase the numbers in the code.

💡 Tip: This works for most hosting providers. If it doesn’t, you may need to edit .htaccess or use your host’s PHP selector.

If you have any questions, drop them in the comments — I’ll be glad to help!
And don’t forget to like and subscribe if this tutorial helped you. 🙌