{"id":1189,"date":"2025-11-09T21:19:57","date_gmt":"2025-11-09T13:19:57","guid":{"rendered":"https:\/\/virtualcardx.com\/?p=1189"},"modified":"2025-11-13T20:46:05","modified_gmt":"2025-11-13T12:46:05","slug":"wordpress-post-security-publish","status":"publish","type":"post","link":"https:\/\/virtualcardx.com\/en\/2025\/11\/09\/\u8fdc\u7a0b\u53d1\u5e03wordpress\u6587\u7ae0\u5b89\u5168\u64cd\u4f5c\u6307\u5357\/","title":{"rendered":"Remote Publishing of WordPress Posts Secure Practice Guide"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Prioritize secure transmission methods<\/h2>\n\n\n\n<p>Replace XML-RPC with WordPress REST API (higher risk) and force to enable HTTPS encrypted data transfer to avoid plaintext leakage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enhanced authentication<\/h2>\n\n\n\n<p>Enable OAuth 1.0a or application password authentication, disable simple HTTP base authentication; with two-factor authentication (2FA) and reCAPTCHA authentication to eliminate brute force.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Preferred: OAuth 1.0a authentication (most secure)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Applicable Scenarios<\/strong>: Third-party tools \/ custom programs to remotely invoke REST APIs<\/li>\n\n\n\n<li><strong>principle<\/strong>: Generate signatures via \u201cConsumer Key\u201d and \u201cConsumer Secret\u201d, each request contains a timestamp and a random number, avoiding the transmission of keys in the clear.<\/li>\n\n\n\n<li><strong>dominance<\/strong>: No need to expose account passwords, supports fine-grained permissions control (e.g., only \u201cpublish article\u201d operations are allowed), and cannot reuse signatures even if the request is intercepted.<\/li>\n\n\n\n<li><strong>implementation method<\/strong>::\n<ul class=\"wp-block-list\">\n<li>Install a plugin (e.g. WP OAuth Server) to enable the OAuth service on the WordPress side;<\/li>\n\n\n\n<li>Third-party tools (e.g., Python scripts, client programs) generate signature requests through OAuth libraries (e.g., oauth1-requests).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Secondary: Application Passwords (natively supported by WordPress)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Applicable Scenarios<\/strong>: Lightweight remote publishing (e.g., script automation, simple tool integration)<\/li>\n\n\n\n<li><strong>principle<\/strong>: Generate separate \u201capplication passwords\u201d (not login passwords) for WordPress users, tied to usernames, with support for separate revoke.<\/li>\n\n\n\n<li><strong>dominance<\/strong>: Native support (WordPress 5.6+), no additional plugins required, prevents master password leaks, and simply revokes the app's password after a leak.<\/li>\n\n\n\n<li><strong>caveat<\/strong>::\n<ul class=\"wp-block-list\">\n<li>HTTPS must be forced on (otherwise passwords are transmitted in clear text);<\/li>\n\n\n\n<li>It is recommended to generate different passwords for different purposes (e.g. \u201cScript Publishing\u201d and \u201cTool A\u201d).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Restricted access<\/h2>\n\n\n\n<p>Assign minimal permissions such as \u201cauthor\u201d to remote publishing accounts, and set up IP whitelisting via .htaccess or Cloudflare to allow only trusted IPs to access the interface.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Disable redundancy<\/h2>\n\n\n\n<p>When XML-RPC is not needed, disable it with a plugin or code (add add_filter(\u2018xmlrpc_enabled\u2019, \u2018__return_false\u2019); to functions.php ), disable system.multicall method to prevent batch attacks.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security Configuration and Monitoring<\/h2>\n\n\n\n<p>Use Wordfence and other security plug-ins for protection, regularly check server logs, and use Fail2Ban to automatically block malicious IPs; account passwords should contain letters, numbers, and special symbols (\u226512 digits in length), and do not use the default admin username.<\/p>","protected":false},"excerpt":{"rendered":"<p>Prioritize Secure Transmission with WordPres ... <\/p>\n<p class=\"read-more-container\"><a title=\"Remote Publishing of WordPress Posts Secure Practice Guide\" class=\"read-more button\" href=\"https:\/\/virtualcardx.com\/en\/2025\/11\/09\/\u8fdc\u7a0b\u53d1\u5e03wordpress\u6587\u7ae0\u5b89\u5168\u64cd\u4f5c\u6307\u5357\/#more-1189\" aria-label=\"Read more about Secure Remote Publishing of WordPress Articles\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":1192,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-1189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/comments?post=1189"}],"version-history":[{"count":0,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1189\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media\/1192"}],"wp:attachment":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media?parent=1189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/categories?post=1189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/tags?post=1189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}