I've got a script to post some data to wordpress using xmlrpc.
If I use a simple string for the body like "This is a test" it works fine.
However, if it has any HTML formatting in it, it gets horribly mangled when trying to add the post.
How do I post html content to wordpress with xmlrpc?
XML-RPC functionality is turned on by default since WordPress 3.5. In previous versions of WordPress, XML-RPC was user enabled. To enable, go to Settings > Writing > Remote Publishing and check the checkbox.
The xmlrpc. php allows remote connection to WordPress. Without it, various tools and publishing applications simply will not be able to access the website.
While the outdated xmlrpc. php file still comes with every WordPress installation, you should disable it because it adds security vulnerabilities to your site.
WordPress used XMLRPC to allow its users to interact with their site remotely. It still uses it to power its mobile app and to support plugins like JetPack, WooCommerce, etc. Using the xmlrpc.
Here's a plugin that fixes a problem with some versions of an xml library that strips html: Plugin – LibXML2 Fix | Joseph Scott
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With