सामग्री पर जाएँ
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.

परखा गया 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

लेखक

Inder Kochar

सिस्टम्स और नेटवर्क इंजीनियर – मैं वही समाधान लिखता हूँ जो क्लाइंट्स के साथ इस्तेमाल करता हूँ, असली सिस्टम पर परखे हुए। ऐसी ही किसी समस्या में फँसे हैं?

आगे पढ़ें

सवाल पूछें या अपना समाधान बताएँ

आपका ईमेल प्रकाशित नहीं होगा। टिप्पणियाँ जाँची जाती हैं – कृपया विषय से जुड़ी रखें।