Initial assessment without passwords Quote before intervention One accountable specialist from start to finish

Http Php Visible Failures

WordPress Returns 504 Gateway Timeout on One Administrator Action

Diagnose a WordPress 504 on one administrator task by tracing proxy deadlines, PHP execution, MySQL locks, remote APIs and safe batching.

A 504 means a gateway or proxy waited too long for an upstream response. If only one administrator action fails, the request probably performs more work than the proxy deadline allows: an import, bulk edit, backup, remote API call or slow database operation.

Do not click the action repeatedly. The first request may continue after the browser sees 504, creating duplicate imports, emails or changes.

Preserve the exact action

Record administrator URL, button/action, start and failure time, selected records, user role and any job/reference ID. Check whether the intended result appears after several minutes.

Correlate:
proxy 504 timestamp/request ID
web server upstream timing
PHP process/log
MySQL query or lock
plugin/background-job log

Keep personal data and nonce values out of shared evidence.

Identify the timeout layer

Cloudflare, load balancer, Nginx/Apache, PHP and external APIs have separate deadlines. Inspect response headers and logs to find which layer generated the 504.

Raising PHP max_execution_time cannot help when an edge proxy stops waiting earlier. Conversely, increasing the proxy deadline only hides an inefficient task.

Use hosting-supported settings and document the effective web and CLI values.

Check whether work continues

Inspect running PHP processes, scheduled jobs and plugin status before retrying. Some tools enqueue work and the browser only waits for acknowledgement; others perform everything synchronously.

If the original request is still running, allow it to finish or terminate it through approved controls after assessing partial-write risk.

Two concurrent bulk tasks can lock each other and worsen the timeout.

Audit partial results before recovery

Compare the intended item set with what actually changed. For an import, use stable source IDs; for a bulk edit, compare modification times and the target field; for email, consult provider message IDs.

Do not use the last visible screen as a checkpoint because the server may process later items after the proxy disconnects. Create a bounded exception list and decide whether each item needs resume, rollback or no action.

Trace MySQL waits

Use slow-query and lock-wait evidence for the request window. A bulk update may scan unindexed metadata or wait behind a backup/import transaction.

Run EXPLAIN on a sanitised equivalent query in staging. Do not kill MySQL threads or add indexes without understanding active transactions and write cost.

Commit custom jobs in bounded batches so locks are released regularly.

Inspect remote dependencies

Licensing, image download, CRM, DNS and API requests may wait without a sensible timeout. Match provider/request IDs and server cURL errors.

Custom HTTP calls should set bounded connection and response timeouts and handle an unknown result safely. Avoid retrying non-idempotent external operations blindly.

Move non-critical remote work to a background queue and report progress to the administrator.

Convert synchronous work into batches

Imports, search replacements and media regeneration should process a known number of items per request or through WP-CLI/server jobs.

Safe batch design:
stable item IDs
checkpoint after each batch
idempotent retry
visible error list
resume without starting over

Do not store the entire dataset in one WordPress option or PHP array.

Adjust limits only when justified

If measured work is efficient but legitimately exceeds a short proxy deadline, run it through CLI or a background process. Increasing the public web timeout ties up workers and makes denial-of-service easier.

Calculate PHP worker, memory and database capacity for concurrent tasks. Schedule heavy administration outside peak traffic.

Keep an independent backup before a bulk mutation.

Verify completion and rollback

Re-run a small controlled batch and confirm the request returns before every relevant deadline. Check item counts, logs and partial records from earlier attempts.

Test normal public and administrator pages while the job runs. Recurring care should monitor long administrator requests and scheduled-job failures; a repaired workflow finishes predictably, resumes safely and does not require staff to guess whether a timeout changed data.

BEFORE YOU SEND THE REQUEST

Frequently asked questions.

Do you ask for passwords in the form?+

No. The public form never requests access. Secure credentials are requested only after the scope and quote are approved.

Who reviews the incident?+

The request goes to Jordi Ensenyat, founder of Code Barcelona and a WordPress specialist with more than 15 years of experience.

Is anything changed before the quote?+

No. Visible symptoms and scope are reviewed first. Intervention begins after approval and with a rollback path prepared.

Do you work internationally?+

Yes. WP Repair handles WordPress and WooCommerce incidents in English and Spanish through a remote service.

Assess my incident