Saltar al contenido
WordPress

Elementor “Can’t Edit?” Error on Nginx: Fix the try_files Rule

Change try_files $uri $uri/ /index.php; to try_files $uri $uri/ /index.php?$args; in the site’s location / block, test with nginx -t and reload.

Probado en Nginx 1.18–1.24, WordPress 6.x

Elementor warning: Can’t Edit? Having trouble loading Elementor?

You open a page in Elementor and, instead of the editor, see “Can’t Edit? Having trouble loading Elementor? Please enable Safe Mode to Troubleshoot.” On Nginx servers the cause is often a try_files rule that throws away the query string WordPress needs.

Why it happens

Elementor (and much of WordPress) loads the editor through URLs such as /wp-admin/post.php?post=12&action=elementor and REST requests with parameters. If Nginx rewrites requests to /index.php without ?$args, those parameters never reach PHP.

The fix

  1. Open your site’s config, usually /etc/nginx/sites-available/your-site.conf.
  2. Find the location / block.
  3. Add ?$args to the end of try_files.
Site config
# Beforenlocation / {n    try_files $uri $uri/ /index.php;n}nn# Afternlocation / {n    try_files $uri $uri/ /index.php?$args;n}

Test and reload

Terminal
sudo nginx -tnsudo systemctl reload nginx

Reload the Elementor editor – it should open normally.

Still not loading?

Then check the usual suspects: PHP memory_limit below 256M, a security plugin blocking /wp-json/, or a caching/optimisation plugin that minifies admin scripts. The browser console (F12) shows which request fails.

Inder Kochar

Escrito por

Inder Kochar

Ingeniero de sistemas y redes – Documento las soluciones que aplico con mis clientes, probadas en sistemas reales. ¿Atascado con algo parecido?

Seguir leyendo

Haga una pregunta o comparta su solución

Su correo no se publica. Los comentarios se moderan – por favor, cíñase al tema.