"Maximum execution time of 30 seconds exceeded" is PHP stopping a script that ran past its configured time limit — it is not a verdict on your file's format, and WordPress itself never sets that number. It shows up during media uploads because a big upload is one of the few things in a normal WordPress session that can keep PHP busy long enough to trip the clock.
The interesting part, and the part almost every article on this error gets wrong, is that max_execution_time is not the directive the official documentation associates with upload duration. There is a second one.
What this error actually means
WordPress's own Common WordPress errors page lists this under "Maximum execution time exceeded" and gives the wording verbatim:
"You may receive a message such as "Maximum execution time of 30 seconds exceeded" or "Maximum execution time of 60 seconds exceeded"."
Note that the docs show two different numbers in the same sentence. That is your first clue: 30 seconds is not a WordPress constant, it is whatever your server happens to be configured with. The official explanation of the cause is simply that a process is taking longer than allowed to finish and is timing out.
The mechanism is spelled out in the PHP Optimization page of the Advanced Administration Handbook:
"The primary PHP timeout can be set with the max_execution_time php.ini directive. This limits code execution, and not system library calls or MySQL queries, except on Windows, where it does."
That qualifier matters when you are diagnosing. Time spent inside a slow MySQL query or a system library call is not what max_execution_time is counting — except on Windows, where the docs say it does. Same error text, different things being measured, depending on the platform.
The directive that actually governs upload time
Here is the increment. The same PHP Optimization page describes a separate directive:
"The maximum time allowed for data transfer from the web server to PHP is specified with the max_input_time php.ini directive. It is usually used to limit the amount of time allowed to upload files. It's important to note that the amount of time is separate from max_execution_time, and defines the amount of time between when the web server calls PHP and execution starts."
Read that slowly:
max_input_timeis described as the one "usually used to limit the amount of time allowed to upload files".- It covers the window before your script starts running — between the web server handing the request to PHP and execution beginning. On a large upload, that window is where the file is actually travelling.
- The docs say the two amounts of time are separate.
So if you raise max_execution_time and the upload still dies on big files, you have not necessarily done anything wrong — you may simply have adjusted the timer that was not the one expiring. Check both values with your host before concluding that the timeout cannot be raised.
The fastest fix: give PHP less to wait for
Whatever the timer is set to, a shorter transfer is less likely to hit it. This is not a workaround someone invented — it is the first bullet in WordPress.com's own list of what to do when a large file will not upload:
"Compress the file to reduce its size, then upload it again."
The support docs also explain why duration is the enemy on a big media file:
"A larger file can fail partway through the upload. The larger the file, the longer it takes, and many networks end an upload that runs for too long."
Compressing before you touch the Media Library is the one fix that works identically on self-hosted WordPress, on a Multisite network, and on WordPress.com — because it changes your file rather than the server you may not control.
Try it right here
Runs in your browser. Your file is not uploaded anywhere.
This runs inside your browser tab: the video is read from disk, re-encoded locally, and handed back. Nothing is uploaded to an intermediate server, which matters here — you are trying to avoid one slow upload, not add a second one. The troubleshooting guidance in WordPress.com's support centre makes the same general point about restraint: "Consider compressing your files and only uploading the size you need."
For the wider background on what you actually give up when you compress, see how to compress a video without losing quality.
Raising the timeout, exactly as the docs write it
If you can edit server configuration, the Common WordPress errors page gives two options and no others. Add this line to .htaccess:
php_value max_execution_time 60Or this to php.ini:
max_execution_time = 60Two things to keep straight. First, both official examples land on 60; the documentation does not recommend a ceiling beyond that, so treat larger values as your host's call, not WordPress's. Second, this changes the timeout only. The official errors page does not publish an equivalent line for raising the maximum upload size, so do not copy a php_value upload_max_filesize snippet from elsewhere and assume it carries the same authority.
And before you spend an afternoon on it, the PHP Optimization page has a warning aimed squarely at people on cheap plans:
"Bear in mind that on shared hosting accounts, those limits are usually set on a server level and you may not be able to modify them or increase them above a certain value."
Other causes, in order of likelihood
The file is over the size ceiling, not the time ceiling. WordPress's wp_max_upload_size() function "Determines the maximum upload size allowed in php.ini," and its source returns the min() of upload_max_filesize and post_max_size — the smaller of the two wins. The Media Add New screen documentation says the figure you see in the uploader is "as set by your hosting provider." The docs also require that "The value for post_max_size must be greater than or equal to the value for upload_max_filesize" — greater than or equal to, not strictly larger.
PHP ran out of memory rather than time. That produces a different message: "An Allowed Memory Size Exhausted error means that your WordPress installation doesn't have enough memory to achieve what you want." The handbook ties the admin-side memory setting directly to this workflow — of WP_MAX_MEMORY_LIMIT it says, "This is mainly required for media uploads." Documented defaults: WP_MEMORY_LIMIT is "40 MB and WordPress MultiSite default is 64 MB", WP_MAX_MEMORY_LIMIT is "256 MB".
You are on a Multisite network. Network Admin has its own upload settings, and the documented default for "Max upload file size" is "[ 1500 ] KB", with site upload space defaulting to "[ 50 ] MB". A generous php.ini does not make those fields disappear from the network settings screen.
You are on WordPress.com. There is no php.ini to edit; that documentation frames upload problems in terms of plan, storage and file type instead. Compressing first is the lever you still have.
How to tell it worked
Retry the same file and watch where it stops. If it now completes, the transfer simply fit inside the window. If it fails at the same point with the same message after you raised max_execution_time, look at max_input_time next — per the docs, that is the one tied to upload duration. If the message changes to a memory error or a file-type error, you have moved on to a different problem, and the size and memory notes above are where to go next.
FAQ
Why does WordPress say "Maximum execution time of 30 seconds exceeded"? A PHP process ran past the time limit configured on your server and was stopped. The official docs show both a 30-second and a 60-second version of the message, which tells you the number comes from your configuration, not from WordPress.
Is max_execution_time really the setting that controls uploads?
Not according to the handbook. It describes max_input_time as the directive "usually used to limit the amount of time allowed to upload files," covering the transfer from the web server to PHP, and says that time is separate from max_execution_time.
What value should I set the timeout to?
The official fix shows 60 in both the .htaccess and php.ini examples. Beyond that, the docs note that on shared hosting these limits are often fixed at server level and may not be raisable at all.
Does raising the timeout also raise my maximum upload size?
No. Size is governed by upload_max_filesize and post_max_size, and WordPress reports the smaller of the two. The common-errors page gives a timeout line only.
I only need audio on the page — is there a smaller thing to upload? Possibly. WordPress.com's audio documentation states, "You can upload audio files with any paid plan on WordPress.com." If the post is a podcast episode rather than a video, pulling the audio out first gives you a much smaller file to send. Browse all Clapr tools or the rest of our fix guides.
Quotes taken from WordPress's official documentation — Common WordPress errors and PHP Optimization on developer.wordpress.org, and the WordPress.com support centre — as recorded on 16 September 2026. Server defaults vary by host; check your own configuration before changing it.