Update: After further inspection it appears that the pages that were effected are being created as "Archive" pages, but there is no archive.php file so they are using index.php. Why would my pages become archive pages when they have custom page-{slug} templates, and how do I fix this?

(Earlier. . .) My theme was installed and has been working properly for a couple of weeks now, until I accidentally activated and deactivated WP Super Cache.

My theme includes custom post types that are populated on page templates (i.e. I have a page titled "Careers" which uses the page-careers.php template, and runs a query to show all of the posts with a custom post type of "job"). This was working just fine, previously.

Yesterday, I installed WP Super Cache and accidentally activated it. Since I did not mean to activate it, I quickly deactivated it and got the following error (I've replaced my actual username with "myusername"):

Warning: include(/home/myusername/test.rocquemoremedia.com/wp-content/wp-cache.config.php): failed to open stream: No such file or directory in /home/myusername/test.rocquemoremedia.com/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 7

Warning: include(): Failed opening '/home/myusername/test.rocquemoremedia.com/wp-content/wp-cache-config.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/myusername/test.rocquemoremedia.com/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 7

The error seemed to resolve itself and I was redirected back to the admin site, but when I went to view the site, I noticed that all the pages that were using custom page templates are now just using my index.php template, with the exception being the "Home" page and the "Contact" page. And, I believe the only reason the "Home" and "Contact" pages are okay is because neither of them use the loop to show posts.

I would like to know what I did wrong, and how I can get my pages back to their respective page templates.

  • Are the template files still physically present?.. I can't of a way caching plugin would interfere with templates typically.
    – Rarst
    Commented Oct 4, 2015 at 15:56
  • The template files are still physically there (just checked again in Filezilla). And, the pages themselves are still set to the page templates, from the admin side.
    – Codette
    Commented Oct 4, 2015 at 16:17
  • @Rarst I've edited my post since the problem might not have to do with WP Super Cache after all. What I can't figure out is why the pages would suddenly become "archive" pages, instead of using the templates designated to them.
    – Codette
    Commented Oct 4, 2015 at 17:34
  • That sounds like something might be messing up your main query. Disable plugins, try core theme, usual motions...
    – Rarst
    Commented Oct 4, 2015 at 18:12

1 Answer 1


The issue was my page slugs were the same as my custom post type slugs, which was confusing WordPress. It caused Wordpress to use the index.php file to create my pages, or have a 404 error for my custom posts, if the pages worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.