Zum Inhalt springen
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.

Getestet mit 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

Geschrieben von

Inder Kochar

System- & Netzwerkingenieur – Ich schreibe die Lösungen auf, die ich bei Kunden einsetze – getestet auf echten Systemen. Hängen Sie an etwas Ähnlichem fest?

Weiterlesen

Stellen Sie eine Frage oder teilen Sie Ihre Lösung

Ihre E-Mail-Adresse wird nicht veröffentlicht. Kommentare werden moderiert – bitte beim Thema bleiben.