"Page Not Found"

My website https://www.surfacelevelrecords.com contains artist pages, and everything has worked fine up until now, when I noticed that the artist pages are not found.

I checked the permalinks, and everything looks good, and when I go to pages from my dashboard, from the editor, everything looks fine, but when I go to preview the page, I get a “page not found”: error.

For example: https://www.surfacelevelrecords.com/artists/proseed

Any advice?

The first thing to try when your permalinks return 404 error is to go to Settings > Permalinks, and simply click on Save button. This will rebuild your permalinks. Try it and let us know if this helps.

2 Likes

OK, so it worked, however, I had to change the setting to “Plain” which means it no longer shows “/artists/proseed” for example.

So, I appreciate the help, I just wish I could use “post name” in the settings.

Just reset them at post name and save.
It is not.necessary to change settings to flush them, when something doesn’t work because of them just leave the settings as is and hit save.
This will trigger the site to reset them at the correct value for that setting.

1 Like

Whatever permalink structure you want, it should work. If it doesn’t work, something is causing it and needs to be fixed.

Have you checked your htaccess file? If it’s missing necessary rewrites, your permalinks won’t work.

This is what your htaccess should be:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Thanks, but that didn’t work, which is why I ended up changing the permalinks setting back to plain.

I haven’t checked that. A little above my pay grade, but thanks for the tip.

You probably should not use the Plain permalink setting, this will break a bunch of links on your site and also any links that search engines already knew how to follow.

If you put them back the way they were, maybe we can figure out why the artists pages aren’t working. The way the site is now, we can’t tell.

I worried about that, too. I’ve gone ahead and reverted to “Post name.”

1 Like

It won’t be a problem with the .htaccess file, because visiting blog posts via their permalink works fine.

It looks to me like this is probably because of some plugin. This probably stopped working when you made some change to the configuration of the site. It looks like most pages are not displaying as they should. For example, another link that isn’t working is https://www.surfacelevelrecords.com/about/.

Did you use a plugin to try to customize the way the artist pages show up, or to do anything else with changing permalinks/URLs? If so, which one, and is that plugin still enabled?

What is your permalinks setting currently? Can you post a screenshot of your Settings > Permalinks screen?

Yes, I did add a plugin to modify one of my artist pages, but not all. One in particular is called Custom Sidebars (I just deactivated but nothing changed).

Ok, it looks like you have some broken code in either a plugin or your theme. My guess is the theme but since we can’t see what you have installed from here it’s hard to tell.

Here is a report of a similar issue, with an explanation of how to track it down: Pages permalink work only in “simple” option | WordPress.org

This is were I classically try to start to resolve any issue that “suddenly appears”

What was done just before “it stopped working”?
If that action is known, it can be reverted and resolve the issue.

On the other hand, you can:

  • backup the entire website
  • change theme to something like twentyseventeen (fresh copy/not modified) > check if the issue persists. If not, you know it is the theme. If it persists, continue with below
  • disable 5 plugins, check if the issue persists. If not, you know the issue is within the just disabled 5 plugins. If persists, continue with below
  • disable next batch of 5 plugins, rinse and repeat previous step, until you spot the culprit plugin

Given you register custom post type I am almost sure you do that with a Plugin.
if you want to test while disabling that plugin as well, you can use a tool like https://generatewp.com/post-type/ to temporarily generate that post type, so you can even disable the plugin that currently helps you add the post type “artists”

The other question to ask here is “are you sure it was working fine”.

Since all pages are broken I would not assume that you know the exact moment when this broke.

The artists are not a custom post type, they are regular pages that are children of the main “artists” page.

Great idea. I’ll start with the theme change and go from there.

The culprit appears to be the plugin WP EasyCart. Well that sucks, but I’m glad I found it.

3 Likes

I am using WP EasyCart without any problems.

1 Like

I’m confident WP EasyCart was working with my artist pages working at the same time, so not sure why the sudden problem.

FYI, I changed my theme and reactivated WP EasyCart while using “post names” in the settings and everything appears to be fine.

1 Like