WordPress XHTML validator
Have you noticed how hard it is to keep your blog compliant with standards? Through the WordPress XHTML validator, getting to comply, staying compliant, having valid HTML in your WordPress blog and going Section 508 is a breeze.
This tool is also bundled with Turbocharged for WordPress. Need support? Buy it and get other plugins, themes and support for free.
The WordPress XHTML validator analyzes and validates your entire weblog, and then shows you a list of invalid entries, explaining why each one is invalid and offering valid replacements. The analysis process is very fast: analyzing a weblog with over 400 posts and 2000 comments takes less than one minute.
Hey, you! Yes, you! Did you like this plugin? Want to help WordPress users get Truly Valid? Spend 60 seconds joining the Truly Valid campaign and help make the Web a better place!
This plugin will automatically validate any post or page you edit, notifying you of any validation issues.
This plugin also latches itself onto the Manage section of the WordPress administrative interface, and, when invoked, scans all posts, pages and comments, validating each one.
It requires xmllint or tidy, which do the heavy lifting, installed on your Web hosting server.
- ensure the server has the
xmllintor `tidy` commands installed (having both is doubleplusgood!) - install and activate the plugin
- access the Manage panel in the WordPress administrative interface
- click on the XHTML validation tab
This plugin is now fully compatible with WordPress 2.1.
Download the WordPress XHTML validator now!
Getting help
Help for this software is available in several forms. Here are the rules:
- E-mails or posted comments with bug reports, patches, suggestions or contributions of any kind will be received by me in good faith, and I will, in time, incorporate all submitted improvements, in any form, to the software.
- This software is delivered to you without warranty of any kind, as recognized by the GNU General Public License.
- Special requests, such as customization, third-party licenses, development of large features, or requests which require software engineering to be applied, will be performed by me, for a fee. If you’re attracted to my engineering skills, wait until you see my rates. After all, living on a Third World country has its advantages. Let me know if you’re interested.





January 4th, 2006 at 18:09
By the way, yes, I am aware that this page does not validate. Validation performed by the WordPress XHTML validator is reserved for post content only.
Of course, I’ll fix this as soon as I get somewhere where outgoing SSH access is not firewalled.
January 5th, 2006 at 6:14
[…] XHTML validator,用于验证你的文章是否符合XHTML标准。 XHTML […]
February 8th, 2006 at 6:12
Great plugin that worked at one point of time - now all of a sudden it isn’t working… Saying “Your Web hosting server does not have xmllint installed. Please install it or have the administrator install it for you, then try again.”
The weird part is if I open up shell and execute xmllint it pulls it up, so it is on the server… and the plugin was working previously. Any ideas on what could cause this ?
February 8th, 2006 at 12:19
I honestly wouldn’t know. But I can tell you this: the plugin checks for xmllint, by executing it. If the return value is == 127, then you get the message. So you might want to investigate whether it’s because your PHP setup does not let external commands execute, or maybe because xmllint isn’t located in the PHP’s execution $PATH.
March 7th, 2006 at 15:10
I got this error after clicking on “validate my content now.” What does it mean?
Warning: proc_open() has been disabled for security reasons in .../wp-content/plugins/wp-validator/wp-validator.php on line 153Failed to run xmllint
March 7th, 2006 at 15:12
it means you do not have access to using a function required by xhtml validator
talk to your server admin
March 12th, 2006 at 4:58
I set this running about ten minutes ago and it says it is still loading… is that a reasonable thing to expect from this or is that not normal?
Btw I don’t actually have many posts on my site - probably less than 50.
Am guessing it might be an issue with memory allocation but it isn’t throwing an error yet…
March 13th, 2006 at 16:37
No errors will be shown onscreen. You need to check your server logs, if your browser’s animated throbber stops.
March 25th, 2006 at 17:24
I am getting the error:
I thought that it didn’t require both xmllint and tidy? My server has tidy on it but not xmllint, is there a workaround?
Thanks
Nath
March 28th, 2006 at 15:44
I’ll look into it this weekend.
April 11th, 2006 at 15:15
The validator hangs at 748 out of 1771 entries. Any idea why? I’ve increased max execution time to 60 seconds, and I’ve increased max memory usage to 16M, but the thing still hangs at 748.
Any help would be appreciated.
April 24th, 2006 at 4:05
Hi,
I just installed this plugin on my server, I have xmllint installed, but I don’t have Tidy.
It runs and returns ~60 invalid posts, but the “Quick Fix” column only has “Do not fix” available.
Is this because I don’t have tidy installed? Will installing it take care of that issue?
Thank you,
CG
April 24th, 2006 at 13:40
Indeed, it’s tidy who provides the quick fix functionality. Installing it should take care of this issue.
April 30th, 2006 at 1:11
Thanks a lot Rudd-O, it works like a dream, and now my entire blog is Valid XHTML….
However, I have about twenty “A plugin is damaging the comment” or “A plugin is damaging the content”
I don’t have any markup plug-ins….
May 15th, 2006 at 7:50
Hi,
My web host has never heard of xmllint so could not install it. Any suggestions on how I can explian where to get and install it?
Thanks,
spellmank
May 30th, 2006 at 15:49
foo
June 10th, 2006 at 12:48
Hi,
I have apache 2.0.58, php 5.1.3 and wordpress 2.0.2 installed on my computer running Windows XP SP2.
Before I found your plugin today, I used validator page from W3C (http://validator.w3.org/) to validate my pages.
Cygwin was installed to obtain xmllint, tidy and nice used in the plugin.
I can use xmllint and tidy to validate xhtml files in command line.
However, if I use the plugin to validate xhtml files, it will stop at “processing entry 0 …” and make no progress.
Finally, I found there were infinite loops in the while loops of function run_content_through_xmllint and run_content_through_tidy.
Thus I replace both while loops with the following:
$stdout = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
fclose($pipes[2]);
proc_close($process);
Now, it works fine for me.
June 10th, 2006 at 19:58
Thanks so much for this. Can you please send me your plugin .php file attached? That is so I can run kompare on mine and yours, and visually see the problem.
Have a great day, Zechs!
June 21st, 2006 at 14:10
When attempting to run the XHTML validator I get the following;
Validate all content
Warning: Invalid argument supplied for foreach() in /home/brian/public_html/wordpress/wp-content/plugins/wp-validator.php on line 571
The process is finished. Here’s a report of what WordPress XHTML validator found.
(followed by warnings about invalid XHTML in the title and the content of all the posts).
What does the error mean, how can it be corrected and what does that tell me about the posts?
Many thanks.
June 21st, 2006 at 18:30
Brian, can I ask you a question?
Does your blog have any comments (not marked as spam, of course)?
I need to know in order to fix this.
June 24th, 2006 at 1:55
Would it be possible to make the next release able to automagically do the work in chunks? i.e. scan the first 500, then the next 500, etc. because there are a lot of people that can’t change the max_execution_time in their PHP settings.
Regards,
`CG
July 11th, 2006 at 23:30
Hi There:
Just installed the plugin and want to test it a bit.
After activating the plugin, I’ve clicked on the Manage window, and ended up with this message at the top of my browser window…
Warning: file_get_contents(/home/u2/urbanl/html/wordpress/wp-content/plugins/entity-manifest.txt): failed to open stream: No such file or directory in /home/u2/urbanl/html/wordpress/wp-content/plugins/wp-validator.php on line 50
Upon checking the script (and I should add that I’m not a coder), there’s an entry for the entity-manifest.txt file. Yet the README file states that all I should have to load is the main php file.
Can you please clarify if the manifest file needs to go there, and if not what do I need to do to keep the error message from repeating. Thanks much!
July 11th, 2006 at 23:36
Nevermind…guess it needed to be there so that it can be seen when I click on XHTML Validator tab. Thanks, anyways….testing now.
August 17th, 2006 at 0:49
Hello
I have xmllint on my machine
but when I activate your plugin my blog shows a blank page and
when I rm it, it comes back
in php.ini I have memory use up to 64meg
September 5th, 2006 at 13:11
hello all. thanks for mod.
But
click to plugin activate link:
Warning: exec() has been disabled for security reasons in /var/www/vhosts/mysiteadress.net/httpdocs/blog/wp-content/plugins/wp-validator.php on line 126Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mysiteadress.net/httpdocs/blog/wp-content/plugins/wp-validator.php:126) in /var/www/vhosts/mysiteadress.net/httpdocs/blog/wp-includes/pluggable-functions.php on line 272
September 5th, 2006 at 15:50
The exec() thing is not a bug. Google for the words and you’ll find the answer you’re looking for
November 24th, 2006 at 15:58
When I start the validation, I get the message validating 65 of 89 posts. But then it stops there, nothign happens, no error nothing.pl. help.
http://img131.imageshack.us/img131/1575/clipboard01pe4.jpg
November 27th, 2006 at 22:57
I’m trying to use the validator for approximately 10,000 entries. (I assume that is posts + comments, as I only have about 3,500 posts.) It seems to break horribly no matter what I do…extending max_execution_time doesn’t seem to work. In fact, I was only able to get that partial completion result when I had no PHP modifications in place…when they are there, it just goes on and on endlessly.
Any suggestions on perhaps breaking up the process?
December 18th, 2006 at 5:08
Perfect
January 26th, 2007 at 4:06
很不错的站,学习了.严重感谢
急需高手指点一下怎样设计wordpress.我也想设计成这样的风格了。
http://www.wfoe.cn
March 23rd, 2007 at 3:44
hello all. thanks for mod.
April 22nd, 2007 at 7:31
thanks a bunch for this little plugin, appears on my “must-have” list
cheers,
michael
May 4th, 2007 at 8:13
I get the error :
Fatal error: Unsupported operand types in on line 565
May 21st, 2007 at 19:47
Hi, I’ve installed and set everything correctly and changed my max exec and memory higher but i’m getting this error…
Fatal error: Unsupported operand types in /home/coop/public_html/wp-content/plugins/wp-validator/wp-validator.php on line 572
Any idea? There is nothing even on that line in the php file the last command was…
get_currentuserinfo();
Cheers,
Ed
May 28th, 2007 at 6:07
Whenever I activate this plugin (WP 2.2), the browser hangs whenever I go to edit an existing lengthy post. (New posts are unaffected, as are really short posts.)
August 7th, 2007 at 11:07
Hi-
I’m having the same problem as others. The error I’m getting reads:
Fatal error: Unsupported operand types in /home/marat2/public_html/brianpeppler/wp-content/plugins/wp-validator.php on line 565
This looks like a great plugin; I’m looking forward to using it!
August 23rd, 2007 at 19:58
Please upgrade to the latest PHP5. Or attempt to find a workaround, send it and I’ll distribute it in future versions.
February 2nd, 2008 at 11:52
Great plugin! This is just the thing I’ve been looking for. Thank you.
February 10th, 2008 at 11:02
Dude, this page http://rudd-o.com/projects/wp-validator/ has Failed validation with 26 Errors. I’m having the same trouble on my WP. Is it still usefull to insall ur Plugin?
February 29th, 2008 at 2:18
I’m using WP 2.3.3; when the plugin is active, I cannot edit old posts. When I click a link to edit a post, my browser just hangs and never actually loads the edit-post page.
March 16th, 2008 at 23:19
Jacob: I had the same problem with a few posts and fixed it by adding a call to
stream_set_blockinginrun_content_through_tidy. For some reason tidy would occasionally block stderr. I am running on Dreamhost. You can get the patch, a fresh version of wp-validate.php and some information on my blog: Fixing a glitch in wp-validator.Rudd-O: please feel free to grab the code and integrate it. I revved the version number and added a comment to the description so I would remember the change on later releases. You’ll probably want to remove those if you integrate the changes. Let me know if you need more details about my environment.
March 16th, 2008 at 23:21
Oops, accidentally linked to the front-page. Here’s the permalink: Fixing a glitch in wp-validator.