Wordpress .htaccess/template files

2019-09-11 12:20发布

I have a Wordpress site that I assumed from another company which structurally is a bit different than other ones I've worked on. I'm primarily a Drupal developer, with enough of a working knowledge of Wordpress to get by.

What the developer who created the site did, is within the themes folder, they created a separate page-whatever-whatever.php file for each page on the site. Some of the content on the pages within the site have been entered through the CMS system - some are hard coded on to the template file.

Previously, it was hosted on a .NET server - we're on LAMP.

It appears that the pages with the hard coded data aren't being called - so the data the client previously saw is just coming up blank. The site appears to be ignoring those page-whatever-whatever.php files and using the default template page instead.

My first guess is that it's an htaccess issue? I just have the generic

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

Given the structure they have - is there something else I should be putting in there or changing within the config files?

Thanks in advance!

1条回答
成全新的幸福
2楼-- · 2019-09-11 12:48

I guess no issue with .htaccess file. The error was in template file. Enable debug in wp-config.php.

By wp_debug was false.

define('WP_DEBUG', false);

Change this to

define('WP_DEBUG', true);

Now you can see php error in the template file then debug it.

查看更多
登录 后发表回答