Layers Pages: No Posts Found or 404 Error in Customizer
When you attempt to customize a page using Edit Layout or the Customize link in the admin toolbar, you get a 404 page with No Posts Found and not the Layers page you are trying to customize.
Permalink structure does not allow discovery of the Layers template on your site or your server is misconfigured. Layers does not manage your permalinks.
- Go to →
- Ensure Post Name or one of the Date options is selected (not Default!)
- Click Save to regenerate your permalinks (don’t skip this step)
- Go to Appearance Customize. If the homepage loads, click around your menu to view other Layers pages to verify they work
- If issues persis or your permalinks were already Post Name, return to the Permalinks page and try setting them to Default. Save and test again. If this works, your host may have an incompatible configuration. Try the next section first, then contact them for assistance (see server config section below)
Check Page Structure
- Click on Layers → Layers Pages to view just pages linked to the Layers template
- Ensure they are all top-level and not set as children of another page:
See How to Verify WordPress Page Slugs, Duplicates & Links for instructions on doing a thorough check.
You can set pages as children using the Menu manager under Appearance Menus or directly in the customizer under Menus.
If this solves your issue, you may need to contact your host to inquire about permalink support on your server, or to get help with creating a custom htaccess file that allows you to nest your Layers pages. Hosts running IIS or other servers without explicit Apache mod_rewrite support are at the highest risk of permalink issues.
Check Server Config
Your server can also cause errors in the customizer or when viewing pages if it is not optimized for WordPress. For permalinking to work well, your server needs:
- Apache II mod_rewrite module loaded
- Your WordPress .htaccess file must have correct content and be writeable
- Apache II must allow overrides by your .htaccess file
Caching on the server or from a WordPress plugin can also cause these problems if caching involves making a “flat” copy of your pages. In these cases thr query can’t retrieve the page (such as in the customizer) and you get a 404.
- Check caching plugins for “Page Caching” and turn it off. To do a thorough test, empy all caches, then deactivate the plugin, log out and log back in.
- Check your hosting control panel for caching such as Cloudflare or similar that you can control turning off – use a WordPress plugin you can configure instead. In most cases, Browser and Object caching (if your host supports it) are enough.
- If your host uses Varnish caching, you will need a plugin like Varnish HTTP Purge that purges the cache automatically or give you a button to do it – do it often when working in the admin
If you have access to your web server config and feel comfortable checking yourself, do the following, otherwise please contact your host to explain you have permalink problems with WordPress and would like their help checking the following:
- Verify your web server is running Apache (Linux or Unix servers almost always do this). Windows and Lightspeed POS require specialized setups.
- Verify mod_rewrite is installed and enabled on your Apache II web server, and also make sure that the webserver allows your .htaccess file to override the server directory configuration.
- Verify there is an .htaccess file on your site root. This file should be visible from your fTP client or cPanel file manager. If it is not there, simply create a blank file called .htaccess with no file extension and upload it to your WordPress installation folder.
- Go back and set your permalinks option to the “default” option and save the change. Then set it to something other than the default and save the change.
- As long as the file is writeable by the server, this will set the correct parameters in the .htaccess automatically based on your Permalink settings.
- If it is not writeable, you will see a message below your permalinks screen that contains the rule set you need to add manually into your .htaccess file, save it, and upload it back to the WordPress installation folder.Verify permissions on your .htaccess file allow your web server to write to the file – in FTP, right click and choose File Permissions or CHMOD and set it to 666 at a minimum.
- If you have a WordPress multisite, go to Network Admin > Network Settings and follow the directions to add the displayed code to your wp-config and .htaccess files.
- Check to see if you can navigate from your front page menu links without error.
- If the issue persists, contact your web host support team for further assistance.
Did you know?
Our friends at Jetpack are doing some incredible work to improve the WordPress experience. Check out Jetpack and improve your site's security, speed and reliability.