WordPress中/testimonials固定链接页面无法访问及相关问题求助
Hey Bruno, let's work through this WordPress issue step by step—here's how I'd diagnose and fix it based on the symptoms you shared:
This error almost always points to broken HTML syntax somewhere in your site's code, which is crashing the getOutput() function when it tries to render the page. Here's what to check:
- Switch to a default theme (like Twenty Twenty-Four): Custom themes often have bugs in page templates, header files, or custom page layouts—especially unclosed tags, malformed elements, or empty start tags (like
<>) that slip in during edits. If the page loads after switching, your theme is the culprit. Dig into itspage.php,header.php, or any custom template assigned to/testimonialsto hunt down the broken HTML. - Disable all plugins temporarily: If switching themes doesn't help, turn off every plugin one by one, reloading the page after each. It’s likely a plugin (maybe the one handling your iframe or feed) is outputting invalid HTML. Once you find the problematic plugin, update it, replace it, or tweak its code to fix the tag issue.
/testimonials page Since you can’t create a new page with the same permalink, the old page’s record is probably still lingering somewhere:
- Check the Trash folder: Head to Pages > Trash—sometimes pages get accidentally deleted, but their permalink is still reserved. If you find it there, restore it and you’re good to go.
- Query your database directly: If the trash is empty, the page record might be stuck in an odd status (like
draft,private, or corrupted). Use a tool like phpMyAdmin to run this SQL query (replacewp_with your database prefix):
If you get a result, check theSELECT * FROM wp_posts WHERE post_name = 'testimonials' AND post_type = 'page';post_statuscolumn. If it’s notpublish, you can update it topublishto restore the page, or delete the row entirely to free up the permalink for a new page.
The inability to edit your header is almost certainly a side effect of the page rendering error. Once you fix the broken HTML from step 1:
- Try accessing the header editor again (either via the Customizer or your theme’s built-in editor). If it still doesn’t load, clear your browser cache and WordPress’s object cache (if you use a caching plugin).
Even after fixing the page, sometimes WordPress’s permalink cache gets messed up. Head to Settings > Permalinks, don’t change any settings—just click "Save Changes". This will regenerate the permalink rules and ensure /testimonials maps correctly to your page.
内容的提问来源于stack exchange,提问作者Bruno Vezoli

