{"id":26494,"date":"2023-02-07T20:19:10","date_gmt":"2023-08-05T06:11:50","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/"},"modified":"2025-08-11T21:34:04","modified_gmt":"2025-08-11T13:34:04","slug":"%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/","title":{"rendered":"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9"},"content":{"rendered":"<p>\u636e\u6211\u6240\u77e5\uff0c\u5728\u8857\u4e0a\uff0c\u6700\u8fd1\u6d41\u884c\u5728WordPress\u4e2d\u521b\u5efaAffiliate Blog\u3002\u7136\u800c\uff0c\u4ecePHP\u5f00\u53d1\u8005\u548c\u670d\u52a1\u5668\u7ba1\u7406\u5458\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u6211\u8ba4\u4e3aWordPress\u6709\u4e00\u4e9b\u95ee\u9898\uff0c\u6211\u60f3\u5c3d\u91cf\u5199\u4e0b\u6765\u3002<\/p>\n<p>\u6211\u4e0d\u6253\u7b97\u6279\u8bc4WordPress\uff0c\u53ea\u662f\u63d0\u9192\u5927\u5bb6\u6ce8\u610f\uff1a\u89e3\u51b3\u65b9\u6cd5\u662f\u4ee5\u5927\u7ea64:1:5\u7684\u6bd4\u4f8b\u9605\u8bfb\u76f8\u5173\u7684\u6587\u7ae0\u548c\u8bc4\u8bba\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u591f\u7406\u89e3\u3002<\/p>\n<p>\u21d2 \u3010WordPress\u3011WordPress\u7684\u8fd9\u91cc\u5f88\u597d<\/p>\n<hr \/>\n<h2>1. \u8bbe\u8ba1\u592a\u8fc7\u53e4\u8001\u5728\u6211\u4e4b\u524d\u5199\u7684\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5bf9 admin-ajax.php \u7684\u4ee3\u7801\u8fdb\u884c\u4e86\u4e00\u756a\u6d4f\u89c8\uff0c\u4f46\u662f\u54e6&#8230;\u8fd9\u771f\u7cdf\u7cd5&#8230;\u3002<\/p>\n<p>\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1a\u8981\u6c42\u4e00\u6b21\u518d\u6b21\u88ab\u8fde\u547c\uff0c\u5728\u5168\u5c40\u7a7a\u95f4\u5185\u5b9a\u4e49()\u548c\u914d\u7f6e\u6570\u7ec4\u6df7\u6742\u5728\u4e00\u8d77\uff0c$_GET\u3001$_POST\u548c$_REQUEST\u7fe9\u7fe9\u8d77\u821e\uff0c\u6587\u4ef6\u4e0d\u4ec5\u6ca1\u6709\u6210\u4e3a\u7c7b\uff0c\u8fde\u51fd\u6570\u90fd\u6ca1\u6709&#8230;\u4e0d\u8db3200\u884c\u7684\u4ee3\u7801\u5c31\u6210\u4e86\u4e00\u4e2a\u7b11\u6599\u7684\u5b9d\u5e93\uff0c\u4eff\u4f5b\u65f6\u5149\u5012\u6d41\u5230\u4e86\u5927\u7ea615\u5e74\u524d\u7684PHP4\u65f6\u4ee3\u3002<\/p>\n<p>WordPress\u975e\u5e38\u6ce8\u91cd\u5411\u540e\u517c\u5bb9\u6027\uff0c\u8fd9\u4e00\u70b9\u4ece\u4ed6\u4eec\u6700\u8fd1\u624d\u505c\u6b62\u652f\u6301PHP5.2.4\uff08\u53d1\u5e03\u4e8e2007\u5e748\u670830\u65e5\uff01\uff09\u8fd9\u4e2a\u975e\u5e38\u53e4\u8001\u7684PHP\u7248\u672c\u5c31\u53ef\u4ee5\u770b\u51fa\u6765\u3002<\/p>\n<p>\u6211\u8ba4\u4e3aWordPress\u4e4b\u6240\u4ee5\u80fd\u591f\u6210\u4e3a\u5168\u7403\u6700\u5927\u7684\u4efd\u989d\uff0c\u8fd9\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u5f52\u529f\u4e8e\u8be5\u7b56\u7565\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5728\u65e7\u7248\u672c\u7684 PHP \u4e2d\uff0c\u65e0\u6cd5\u4f7f\u7528\u547d\u540d\u7a7a\u95f4\u3001\u95ed\u5305\uff0c\u4e5f\u4e0d\u80fd\u5f3a\u5236\u8fdb\u884c\u7c7b\u578b\u68c0\u67e5\u3002<\/p>\n<p>\u5c3d\u7ba1PHP\u79ef\u6781\u5438\u6536\u5176\u4ed6\u8bed\u8a00\u7684\u4f18\u70b9\u5e76\u4e0d\u65ad\u53d1\u5c55\uff0c\u8fd9\u5b9e\u5728\u662f\u4ee4\u4eba\u975e\u5e38\u9057\u61be\u7684\u4e8b\u3002<\/p>\n<hr \/>\n<h3>1-1. \u9891\u7e41\u4f7f\u7528\u7c7b\u578b\u8f6c\u6362\u5728WordPress\u4e2d\uff0c\u5e7f\u6cdb\u4f7f\u7528\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5982\u679c\u7528(int)\u5168\u6587\u641c\u7d22\u6e90\u4ee3\u7801\uff0c\u80fd\u627e\u52301500\u591a\u5904\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">var_dump<\/span><span class=\"p\">((<\/span><span class=\"n\">int<\/span><span class=\"p\">)<\/span> <span class=\"s1\">'a'<\/span><span class=\"p\">);<\/span>\r\n<\/code><\/pre>\n<p>\u4f46\u662f\uff0c\u4e0a\u8ff0\u7684\u7ed3\u679c\u5c06\u4f1a\u53d8\u4e3aint(0)\uff0c\u7136\u800c\u8fd9\u79cd\u884c\u4e3a\u5bf9\u4e8e\u4eba\u7c7b\u6765\u8bf4\u5e76\u4e0d\u76f4\u89c2\uff0c\u5982\u679c\u968f\u4fbf\u4f7f\u7528\u7684\u8bdd\uff0c\u53ef\u80fd\u4f1a\u6210\u4e3a\u9519\u8bef\u548c\u6f0f\u6d1e\u7684\u6e29\u5e8a\u3002<\/p>\n<p>\u6211\u8ba4\u4e3aWordPress\u5e7f\u6cdb\u4f7f\u7528\u7c7b\u578b\u8f6c\u6362\u662f\u56e0\u4e3a\u5176\u8bbe\u8ba1\u7c7b\u4f3c\u4e8ePHP4\u65f6\u4ee3\u7684\u65e7\u7248\u672c\uff0c\u4ee5\u53ca\u8003\u8651\u5230\u65e0\u6cd5\u5f3a\u5236\u7c7b\u578b\u7684\u65e7\u73af\u5883\u7b49\u5404\u79cd\u56e0\u7d20\u3002<\/p>\n<p>\u7136\u800c\uff0c\u6211\u8ba4\u4e3a\uff0c\u5982\u679c\u91c7\u7528\u66f4\u73b0\u4ee3\u5316\u7684\u8bbe\u8ba1\uff0c\u4ee5\u4e0b\u4e09\u79cd\u81f4\u547d\u7684\u6f0f\u6d1e\u662f\u4e0d\u4f1a\u51fa\u73b0\u7684\u3002<\/p>\n<ul class=\"post-ul\">WordPress 4.7.1 \u306e\u6a29\u9650\u6607\u683c\u8106\u5f31\u6027\u306b\u3064\u3044\u3066\u691c\u8a3c\u3057\u305f | \u5fb3\u4e38\u6d69\u306e\u65e5\u8a18<\/ul>\n<hr \/>\n<h3>1-2. \u6ca1\u6709\u81ea\u52a8\u88c5\u586b\u673a\u5236\u5728WordPress\u4e2d\uff0c\u6ca1\u6709\u5185\u7f6e\u7684\u81ea\u52a8\u52a0\u8f7d\u673a\u5236\u6765\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5f53\u8bbe\u8ba1\u5e08\u5b89\u88c5\u65b0\u7684\u63d2\u4ef6\u6216\u4e3b\u9898\u4e4b\u540e\uff0c\u6709\u65f6\u4f1a\u5728\u670d\u52a1\u5668\u65e5\u5fd7\u4e2d\u8bb0\u5f55\u5230\u201c\u672a\u5b9a\u4e49\u7684XXX&#8230;\uff08XXX\u672a\u5b9a\u4e49\uff09\u201d\u8fd9\u6837\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<p>\u8fd9\u662f\u7531\u4e8e\u63d2\u4ef6\u6216\u4e3b\u9898\u4f5c\u8005\u672a\u9884\u6599\u5230\u7684\u6761\u4ef6\u4e0b\uff0c\u8ba4\u4e3a\u6587\u4ef6\u88ab\u52a0\u8f7d\uff0c\u4f46\u5b9e\u9645\u4e0a\u6ca1\u6709\u88ab\u52a0\u8f7d\u7684\u539f\u56e0\u3002<\/p>\n<p>\u7136\u800c\uff0cPHP \u81ea\u4ece\u5927\u7ea615\u5e74\u524d\u5f00\u59cb\uff0c\u5c31\u62e5\u6709\u4e86\u4e00\u4e2a\u975e\u5e38\u68d2\u7684\u529f\u80fd\uff0c\u5373\u53ea\u8981\u6309\u7167\u7279\u5b9a\u7684\u89c4\u5219\u6765\u5b9a\u4e49\uff0c\u5b83\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u81ea\u52a8\u52a0\u8f7d\u6240\u9700\u7684\u7c7b\uff08\u5373\u5b9a\u4e49\u7684\u6587\u4ef6\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c1\">\/\/-- PHP5\u521d\u671f\u306e\u9803\u306e\u66f8\u304d\u65b9<\/span>\r\n<span class=\"k\">function<\/span> <span class=\"n\">__autoload<\/span><span class=\"p\">(<\/span><span class=\"nv\">$class<\/span><span class=\"p\">)<\/span>\r\n<span class=\"p\">{<\/span>\r\n    <span class=\"nv\">$path<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">dirname<\/span><span class=\"p\">(<\/span><span class=\"k\">__FILE__<\/span><span class=\"p\">)<\/span> <span class=\"mf\">.<\/span> <span class=\"s1\">'\/'<\/span> <span class=\"mf\">.<\/span> <span class=\"nb\">strtolower<\/span><span class=\"p\">(<\/span><span class=\"nv\">$class<\/span><span class=\"p\">)<\/span> <span class=\"mf\">.<\/span> <span class=\"s1\">'.class.php'<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nb\">is_file<\/span><span class=\"p\">(<\/span><span class=\"nv\">$path<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span> <span class=\"k\">require<\/span> <span class=\"nv\">$path<\/span><span class=\"p\">;<\/span> <span class=\"p\">}<\/span>\r\n<span class=\"p\">}<\/span>\r\n\r\n<span class=\"c1\">\/\/-- \u2191\u306e\u66f8\u304d\u65b9\u3067\u306f\u3001\u5b9a\u7fa9\u306e\u8ffd\u52a0\u3084\u512a\u5148\u9806\u4f4d\u4ed8\u3051\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001<\/span>\r\n<span class=\"c1\">\/\/-- \u3057\u3070\u3089\u304f\u5f8c\u3001\u2193\u306e\u3088\u3046\u306b\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/span>\r\n<span class=\"nb\">spl_autoload_register<\/span><span class=\"p\">(<\/span>\r\n    <span class=\"k\">function<\/span> <span class=\"p\">(<\/span><span class=\"nv\">$class<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\r\n        <span class=\"nv\">$path<\/span> <span class=\"o\">=<\/span> <span class=\"k\">__DIR__<\/span> <span class=\"mf\">.<\/span> <span class=\"s1\">'\/'<\/span> <span class=\"mf\">.<\/span> <span class=\"nb\">strtolower<\/span><span class=\"p\">(<\/span><span class=\"nv\">$class<\/span><span class=\"p\">)<\/span> <span class=\"mf\">.<\/span> <span class=\"s1\">'.class.php'<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nb\">is_file<\/span><span class=\"p\">(<\/span><span class=\"nv\">$path<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span> <span class=\"k\">require<\/span> <span class=\"nv\">$path<\/span><span class=\"p\">;<\/span> <span class=\"p\">}<\/span>\r\n    <span class=\"p\">}<\/span>\r\n<span class=\"p\">);<\/span>\r\n<\/code><\/pre>\n<p>Composer\u7684\u51fa\u73b0\u8ba9\u6211\u4eec\u5728\u4f7f\u7528\u73af\u5883\u7684\u65f6\u5019\u4e0d\u518d\u9700\u8981\u6bcf\u6b21\u90fd\u5199require\u7b49\u547d\u4ee4\uff0c\u8fd9\u4e2a\u673a\u5236\u6b63\u662f\u8fd9\u4e2a\u5de5\u5177\u7684\u4f18\u70b9\u3002\u4e0d\u8fc7\uff0c\u8fd9\u4e2a\u673a\u5236\u672c\u8eab\u5176\u5b9e\u65e9\u5728Composer\u51fa\u73b0\u4e4b\u524d\u5c31\u5df2\u7ecf\u5b58\u5728\u4e86\u3002<\/p>\n<p>\u7136\u800c\uff0c\u7531\u4e8eWordPress\u91c7\u7528\u4e86\u66f4\u65e9\u7684PHP4\u65f6\u4ee3\u7684\u9057\u7559\u8bbe\u8ba1\uff0c\u9664\u975e\u91cd\u65b0\u8bbe\u8ba1\uff0c\u5426\u5219\u4f3c\u4e4e\u5f88\u96be\u8ba9WordPress\u5b8c\u5168\u652f\u6301\u8fd9\u4e2a\u673a\u5236\u3002<\/p>\n<p>\u590d\u6742\u7684\u4f9d\u8d56\u5173\u7cfb\u4f1a\u6210\u4e3a\u9519\u8bef\u7684\u6ecb\u751f\u6e90\uff0c\u5e76\u4e14\u7406\u89e3\u8d77\u6765\u9700\u8981\u4ed8\u51fa\u5b66\u4e60\u6210\u672c\u3002<\/p>\n<hr \/>\n<h3>1-3. \u4e0d\u4f7f\u7528\u6a21\u677f\u5f15\u64ce<br \/>\nWordPress\u4e3b\u9898\u662f\u7528\u8fd9\u6837\u7684\u4ee3\u7801\u7f16\u5199\u7684\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nt\">&lt;html<\/span> <span class=\"cp\">&lt;?php<\/span> <span class=\"nf\">language_attributes<\/span><span class=\"p\">();<\/span> <span class=\"cp\">?&gt;<\/span><span class=\"nt\">&gt;<\/span>\r\n    <span class=\"nt\">&lt;meta<\/span> <span class=\"na\">charset=<\/span><span class=\"s\">\"<\/span><span class=\"cp\">&lt;?php<\/span> <span class=\"nf\">bloginfo<\/span><span class=\"p\">(<\/span> <span class=\"s1\">'charset'<\/span> <span class=\"p\">);<\/span> <span class=\"cp\">?&gt;<\/span><span class=\"s\">\"<\/span> <span class=\"nt\">&gt;<\/span>\r\n\r\n        <span class=\"cp\">&lt;?php<\/span> <span class=\"k\">if<\/span> <span class=\"p\">(<\/span> <span class=\"nf\">is_front_page<\/span><span class=\"p\">()<\/span> <span class=\"p\">)<\/span> <span class=\"p\">{<\/span> <span class=\"cp\">?&gt;<\/span>\r\n            <span class=\"nt\">&lt;h1<\/span> <span class=\"na\">class=<\/span><span class=\"s\">\"descr\"<\/span><span class=\"nt\">&gt;<\/span>\r\n                <span class=\"cp\">&lt;?php<\/span> <span class=\"nf\">bloginfo<\/span><span class=\"p\">(<\/span> <span class=\"s1\">'description'<\/span> <span class=\"p\">);<\/span> <span class=\"cp\">?&gt;<\/span>\r\n            <span class=\"nt\">&lt;\/h1&gt;<\/span>\r\n        <span class=\"cp\">&lt;?php<\/span> <span class=\"p\">}<\/span> <span class=\"k\">else<\/span> <span class=\"p\">{<\/span> <span class=\"cp\">?&gt;<\/span>\r\n<\/code><\/pre>\n<p>\u4f5c\u4e3aPHP\u7684\u6a21\u677f\u8bed\u8a00\uff0c\u5b83\u76f4\u63a5\u5229\u7528\u4e86PHP\u7684\u6027\u8d28\uff0c\u4f46\u8fd9\u5bfc\u81f4\u4e86\u53ef\u8bfb\u6027\u7684\u964d\u4f4e\u548c\u6f0f\u6d1e\u7684\u51fa\u73b0\u30025<\/p>\n<p>\u4f7f\u7528\u6a21\u677f\u5f15\u64ce\u9664\u4e86\u53ef\u4ee5\u4e0e\u8bbe\u8ba1\u5e08\u8f7b\u677e\u5408\u4f5c\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u5728\u5b89\u5168\u65b9\u9762\u8f7b\u677e\u5904\u7406\u3002<\/p>\n<p>\u5982\u679c\u4f7f\u7528\u6a21\u677f\u5f15\u64ce\uff0c\u53ea\u9700\u5c06\u5176\u8bbe\u4e3a{{ $hoge }}\uff0c\u4e0d\u5fc5\u8003\u8651\u5373\u4f7f\u5934\u8111\u7a7a\u767d\u4e5f\u4f1a\u81ea\u52a8\u5b8c\u6210\u7684\u597d\u5904\uff0c\u8fd9\u7b80\u76f4\u592a\u9ebb\u70e6\u4e86\u30026<\/p>\n<p>\u4f7f\u7528\u6a21\u677f\u5f15\u64ce\u7684\u8bdd\uff0c\u90a3\u4e9b\u4f4e\u7ea7\u7684XSS\u653b\u51fb\u662f\u5f88\u5bb9\u6613\u88ab\u9632\u8303\u7684\uff0c\u8fd9\u6837\u7684\u62a5\u544a\u7ecf\u5e38\u90fd\u4f1a\u88ab\u63d0\u5230\uff0c\u8ba9\u4eba\u4e0d\u7981\u4f1a\u8bf4\uff1a\u201c\u73b0\u5728\u624d\u8bf4\u8fd9\u79cd\u660e\u663e\u8c0e\u8a00\u5417\uff01\uff1f\u201d<\/p>\n<p>\u5982\u679c\u901a\u8fc7\u806a\u660e\u4eba\u521b\u9020\u7684\u51fa\u8272\u673a\u5236\uff0c\u6211\u4eec\u80fd\u591f\u8f7b\u677e\u5730\u9ad8\u6548\u5efa\u7acb\u4e00\u4e2a\u5b89\u5168\u7684\u7cfb\u7edf\uff0c\u90a3\u5c06\u662f\u7406\u60f3\u7684\u60c5\u51b5\u3002\u53ef\u60dc\uff0cWordPress\u5e76\u4e0d\u5982\u6b64\uff0c\u6211\u8ba4\u4e3a\u63d2\u4ef6\u548c\u4e3b\u9898\u6210\u4e3a\u4e86\u4ea7\u751f\u6f0f\u6d1e\u7684\u56e0\u7d20\u3002<\/p>\n<hr \/>\n<h3>1-4. \u5728\u540e\u65b9\u4e92\u6362\u4f4d\u7f6e\u662f\u4e00\u4e2a\u56f0\u96be\u7684\u95ee\u9898\u3002\u6211\u4ee5\u524d\u662f\u706b\u72d0\u6d4f\u89c8\u5668\u7684\u7528\u6237\uff0c\u4f46\u5728\u65e0\u6cd5\u4f7f\u7528\u201cTab Mix Plus\u201d\u4e4b\u540e\uff0c\u6211\u8f6c\u800c\u4f7f\u7528\u4e86Chromium\u6d4f\u89c8\u5668\u3002<\/p>\n<p>\u6211\u8ba4\u4e3a\u6709\u4e0d\u5c11\u50cf\u6211\u4e00\u6837\u7684\u4eba\u3002\u5b9e\u9645\u4e0a\uff0c\u968f\u7740\u63d2\u4ef6\u89c4\u8303\u7684\u6539\u53d8\uff0cFirefox\u7684\u4efd\u989d\u4ee5\u60ca\u4eba\u7684\u901f\u5ea6\u4e0b\u964d\u3002<\/p>\n<p>WordPress\u4e4b\u6240\u4ee5\u53d7\u5230\u6b22\u8fce\u7684\u4e00\u4e2a\u539f\u56e0\u662f\u5176\u4e30\u5bcc\u7684\u63d2\u4ef6\u548c\u4e3b\u9898\u8d44\u6e90\u3002\u5982\u679c\u8f7b\u6613\u629b\u5f03\u5411\u540e\u517c\u5bb9\u6027\uff0c\u5b83\u5f88\u53ef\u80fd\u4f1a\u9677\u5165\u4e0eFirefox\u7c7b\u4f3c\u7684\u5c40\u9762\u3002<\/p>\n<p>\u540c\u6837\u5730\uff0c\u50cf\u65e7\u7248\u7684 Windows \u64cd\u4f5c\u7cfb\u7edf\u4e00\u6837\uff0c\u65e7\u7248\u7684 PHP \u73af\u5883\u4f9d\u7136\u5b58\u5728\u7740\u5f88\u591a\u3002\u8bb8\u591a\u521d\u5b66\u8005\u5728\u8fd9\u6837\u7684\u73af\u5883\u4e0b\u4f7f\u7528 WordPress\u3002<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u975e\u5e38\u56f0\u96be\uff0c\u5c31\u8fde\u5fae\u8f6f\u8fd9\u6837\u7684\u516c\u53f8\uff0c\u5373\u4f7f\u5c06\u64cd\u4f5c\u7cfb\u7edf\u7684\u5347\u7ea7\u514d\u8d39\u63d0\u4f9b\uff0c\u4e5f\u65e0\u6cd5\u5982\u613f\u4ee5\u507f\u3002\u5bf9\u4e00\u4e2a\u7531\u5fd7\u613f\u8005\u7ec4\u6210\u7684 CMS \u6765\u8bf4\uff0c\u8981\u6c42\u592a\u591a\u5b9e\u5728\u662f\u592a\u8fc7\u5206\u4e86\u3002<\/p>\n<hr \/>\n<h2>2. \u63d2\u4ef6\u548c\u4e3b\u9898\u7684\u81ea\u7531\u6700\u8fd1WordPress\u7684\u4e3b\u4f53\u4ecd\u652f\u6301PHP5.2.4\uff0c\u4f46\u662f\u6709\u8bb8\u591a\u63d2\u4ef6\u548c\u4e3b\u9898\u4e0d\u652f\u6301\u65e7\u7248\u672c\u7684PHP\u3002<\/p>\n<p>\u76f8\u53cd\u5730\uff0c\u5373\u4f7f\u662f\u50cfWooCommerce\u8fd9\u6837\u8457\u540d\u7684\u63d2\u4ef6\uff0c\u5728PHP7.2\u6216\u66f4\u9ad8\u7248\u672c\u4e0a\u7684\u8fd0\u884c\u4fdd\u8bc1\u4e5f\u4f1a\u5ef6\u8fdf\u3002\uff08WordPress\u672c\u8eab\u63a8\u8350\u4f7f\u7528PHP7.3\u3002\uff09<\/p>\n<p>\u7136\u800c\uff0c\u5728\u4f7f\u7528\u4e0d\u652f\u6301\u7684\u7248\u672c\u8fdb\u884c\u64cd\u4f5c\u65f6\uff0c\u5bf9\u4e8e\u5904\u7406\u65b9\u5f0f\u6ca1\u6709\u660e\u786e\u7684\u6807\u51c6\uff0c\u56e0\u6b64 WordPress \u672c\u8eab\u53ef\u80fd\u4f1a\u6b63\u5e38\u8fd0\u884c\uff0c\u4f46\u63d2\u4ef6\u548c\u4e3b\u9898\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c&#8230;\u6700\u7cdf\u7cd5\u7684\u60c5\u51b5\u662f\u751a\u81f3\u8fde WordPress \u672c\u8eab\u4e5f\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c&#8230;\u8fd9\u79cd\u60c5\u51b5\u7ecf\u5e38\u53d1\u751f\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5177\u6709\u77e5\u8b58\uff0c\u53ea\u8981\u67e5\u770b\u65e5\u5fd7\u5c31\u80fd\u5f88\u5feb\u627e\u51fa\u539f\u56e0\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5bf9\u4e8e\u521d\u5b66\u8005\u800c\u8a00\uff0c\u4ed6\u4eec\u53ef\u80fd\u4f1a\u8ba4\u4e3a\u201c\u5c4f\u5e55\u53d8\u6210\u4e86\u4e00\u7247\u7a7a\u767d\uff0c\u6beb\u65e0\u610f\u4e49\u201d\u6216\u8005\u201c\u65e0\u6cd5\u8fd0\u884c\uff0c\u65e0\u53ef\u5948\u4f55\u201d\uff0c\u4ece\u800c\u7ee7\u7eed\u4f7f\u7528\u53e4\u8001\u7248\u672c\u7684\u4e3b\u4f53\u3001\u63d2\u4ef6\u548c\u4e3b\u9898\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5b89\u5168\u6f0f\u6d1e\u7684\u5b58\u5728\u3002<\/p>\n<hr \/>\n<h3>\u5fc5\u987b\u8c28\u614e\u5bf9\u5f85\u6ca1\u6709\u8003\u8651\u5230Nginx\u7684Apache\u524d\u63d0\u7684\u5185\u5bb9\u3002\u8bb8\u591aWordPress\u63d2\u4ef6\u662f\u57fa\u4e8eApache\u73af\u5883\u8fdb\u884c\u5f00\u53d1\u7684\u3002<\/p>\n<p>\u7279\u522b\u662f\u90a3\u4e9b\u4f7f\u7528.htaccess\u6765\u8fdb\u884c\u63a7\u5236\u548c\u5bf9\u91cd\u8981\u8bbe\u7f6e\u6587\u4ef6\u8fdb\u884c\u8bbf\u95ee\u9650\u5236\u7684\u63d2\u4ef6\uff0c\u9700\u8981\u6ce8\u610f\u3002<\/p>\n<p>\u5728Nginx\u4e2d\uff0c\u65e0\u6cd5\u4f7f\u7528.htaccess\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u51fa\u73b0\u63d2\u4ef6\u4f5c\u8005\u672a\u9884\u6599\u5230\u7684\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h3>2-2. \u517c\u987e\u662f\u4e00\u4e2a\u4e0d\u5bb9\u6613\u7684\u95ee\u9898\u3002\u5982\u679c\u80fd\u591f\u7f16\u5199PHP\uff0c\u90a3\u4e48\u4e00\u4e2a\u91cd\u8981\u7684\u4f18\u70b9\u5c31\u662f\u53ef\u4ee5\u81ea\u7531\u5730\u6269\u5c55\u529f\u80fd\u800c\u4e0d\u53d7\u9650\u5236\u3002<\/p>\n<p>\u5728\u7b2c\u4e09\u65b9\u529f\u80fd\u6269\u5c55\u65b9\u9762\uff0c\u540c\u65f6\u5b9e\u73b0\u81ea\u7531\u548c\u7a33\u5b9a\u662f\u975e\u5e38\u56f0\u96be\u7684\u95ee\u9898\uff0c\u5728\u7f51\u7edc\u6d4f\u89c8\u5668\u7684\u63d2\u4ef6\u5f00\u53d1\u9886\u57df\u4e2d\u4e5f\u7ecf\u5e38\u88ab\u8ba8\u8bba\u5230\u3002<\/p>\n<hr \/>\n<h2>3. \u6240\u6709\u7684\u6587\u4ef6\u90fd\u88ab\u653e\u7f6e\u5728\u516c\u5171\u76ee\u5f55\u4e0b\u3002\u4e3e\u4e2a\u4f8b\u5b50\uff0cwp-config.php\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u201c\u914d\u7f6e\u6587\u4ef6\u201d\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u8fde\u63a5\u6570\u636e\u5e93\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u7531\u4e8e\u5b83\u4e0d\u662f\u4e00\u4e2a\u53ef\u4ee5\u8f93\u51fa\u6216\u5904\u7406\u6765\u81ea\u5916\u90e8\u8bf7\u6c42\u7684\u6587\u4ef6\uff0c\u56e0\u6b64\u65e0\u9700\u4ece\u7f51\u7edc\u6d4f\u89c8\u5668\u8fdb\u884c\u8bbf\u95ee\u3002<\/p>\n<p>\u5982\u679c\u662f\u670d\u52a1\u5668\u7ba1\u7406\u5458\uff0c\u6211\u8ba4\u4e3a\u4f1a\u5bf9\u5c06\u8fd9\u6837\u7684\u6587\u4ef6\u653e\u5728\u516c\u5171\u76ee\u5f55\u4e2d\u611f\u5230\u5f88\u4e0d\u8212\u670d\u3002<\/p>\n<p>\u5728WordPress\u4e2d\uff0c\u6709\u4e00\u4e9bPHP\u6587\u4ef6\u4e0d\u5e0c\u671b\u76f4\u63a5\u4eceWeb\u6d4f\u89c8\u5668\u8bbf\u95ee&#8230;<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"o\">!<\/span><span class=\"nb\">defined<\/span><span class=\"p\">(<\/span><span class=\"s1\">'ABSPATH'<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span>\r\n    <span class=\"k\">exit<\/span><span class=\"p\">;<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u4f3c\u4e4e\u5199\u6210\u8fd9\u6837\u662f\u4e00\u79cd\u5e38\u89c4\u505a\u6cd5\uff0c\u4f46\u6700\u597d\u4e0d\u8981\u628a\u8fd9\u79cd\u6587\u4ef6\u653e\u5728\u516c\u5f00\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>\u7531\u4e8eWordPress\u65e8\u5728\u63d0\u4f9b\u4f20\u7edf\u7684\uff08\u5373\u4f7f\u5bf9\u4e8e\u521d\u5b66\u8005\u4e5f\u5f88\u5bb9\u6613\u4f7f\u7528\u7684\uff09\u4f7f\u7528\u65b9\u5f0f\uff0c\u5982\u4e0b\u8f7dzip\u6587\u4ef6\u5e76\u89e3\u538b\u540e\u901a\u8fc7FTP\u4e0a\u4f20\uff0c\u6240\u4ee5\u73b0\u5728\u7684\u6587\u4ef6\u7ed3\u6784\u4e0d\u53ef\u907f\u514d\u5730\u5448\u73b0\u51fa\u8fd9\u6837\u7684\u5f62\u5f0f\uff0c\u6211\u8ba4\u4e3a\u8fd9\u662f\u65e0\u53ef\u5948\u4f55\u7684\u3002<\/p>\n<p>\u7136\u800c\uff0c\u8fd9\u6837\u7684\u8bbe\u8ba1\u5e76\u4e0d\u80fd\u8ba9\u4efb\u4f55\u4eba\u90fd\u8f7b\u677e\u5730\u66f4\u6539\u6587\u4ef6\u7ed3\u6784\uff0c\u8bb8\u591a\u4eba\u4ecd\u7136\u5c06\u6240\u6709\u6587\u4ef6\u653e\u5728\u516c\u5171\u76ee\u5f55\u4e0b\uff0c\u8fd9\u5bf9\u4e8e\u6076\u610f\u8005\u6765\u8bf4\u662f\u4e2a\u53ef\u53e3\u7684\u73af\u5883\u3002<\/p>\n<hr \/>\n<h3>3-1. \u5f0a\u5bb3\u7684\u4f8b\u5b50-1\u4f8b\u5982\uff0c\u6709\u4e9b\u63d2\u4ef6\u53ef\u80fd\u9700\u8981\u81ea\u884c\u521b\u5efa\u67d0\u4e9b\u8bbe\u7f6e\u6587\u4ef6\u3002<\/p>\n<ul class=\"post-ul\">http:\/\/\u25cb\u25cb\u25cb\/wp-content\/plugins\/\u25b3\u25b3\u25b3\/config.ini<\/ul>\n<p>\u8fd9\u4e2a\u6587\u4ef6\u4e5f\u4f4d\u4e8e\u516c\u5f00\u76ee\u5f55\u4e2d\uff0c\u6240\u4ee5\u6709\u53ef\u80fd\u901a\u8fc7\u7f51\u7edc\u6d4f\u89c8\u5668\u7b49\u65b9\u5f0f\u8bbf\u95ee config.ini\uff0c\u5e76\u76d7\u53d6\u5176\u4e2d\u7684\u91cd\u8981\u4fe1\u606f\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5c31\u50cf Akismet \u90a3\u6837\uff0c\u6709\u4e9b\u63d2\u4ef6\u4f1a\u4f7f\u7528 .htaccess \u5728\u5176\u81ea\u8eab\u7684\u76ee\u5f55\u5185\uff08\u25b3\u25b3\u25b3\uff09\u8fdb\u884c\u5904\u7406\uff0c\u4f46\u662f\u8fd9\u6837\u7684\u5904\u7406\u65b9\u6cd5\u56e0\u63d2\u4ef6\u800c\u5f02\u3002<\/p>\n<p>\u5728\u5e38\u7528\u63d2\u4ef6\u4e2d\uff0c\u6211\u89c9\u5f97\u50cf\u8fd9\u4e2a\u4f8b\u5b50\u8fd9\u6837\u7684\u60c5\u51b5\u5e94\u8be5\u4e0d\u4f1a\u53d1\u751f8\uff0c\u4f46\u5c06\u4efb\u4f55\u4e1c\u897f\u653e\u5728\u516c\u5171\u76ee\u5f55\u4e2d\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u98ce\u9669\u3002<\/p>\n<hr \/>\n<h3>3-2. \u5f0a\u5bb3\u7684\u4f8b\u5b50-2\u3010WordPress\u3011\u6211\u5df2\u7ecf\u6574\u7406\u4e86\u4e00\u7bc7\u5173\u4e8e\u7528\u8c37\u6b4c Dorks \u641c\u7d22 WordPress \u53ef\u80fd\u88ab\u9ed1\u5ba2\u653b\u51fb\u7684\u6587\u7ae0\uff0c\u8bf7\u4f5c\u4e3a\u4e00\u79cd\u8b66\u793a\u53c2\u8003\u3002<\/p>\n<hr \/>\n<h3>3-3.\u57fa\u672c\u7684\u6587\u4ef6\u7ed3\u6784\u5c06\u4e0d\u9700\u8981\u901a\u8fc7Web\u6d4f\u89c8\u5668\u8bbf\u95ee\u7684\u6587\u4ef6\u653e\u7f6e\u5728\u79c1\u5bc6\u76ee\u5f55\u4e2d\u662f\u57fa\u672c\u64cd\u4f5c\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u4e0d\u8981\u628a\u6240\u6709\u6587\u4ef6\u653e\u5728\u516c\u5f00\u76ee\u5f55\u4e2d\uff0c\u800c\u662f&#8230;<\/p>\n<pre class=\"post-pre\"><code><span class=\"nc\">ServerName<\/span> example.com\r\n<span class=\"nc\">DocumentRoot<\/span> \/path\/to\/example.com\r\n\r\n<span class=\"c\"># example.com(\u516c\u958b) \u252c index.php<\/span>\r\n<span class=\"c\">#                   \u251c img \u252c 111.jpg<\/span>\r\n<span class=\"c\">#                   \u2502     \u2514 222.png<\/span>\r\n<span class=\"c\">#                   \u2514 data \u252c aaa.ini<\/span>\r\n<span class=\"c\">#                           \u2514 bbb.log<\/span>\r\n<\/code><\/pre>\n<p>\u53ea\u9700\u8981\u5c06\u5fc5\u987b\u4ece\u6d4f\u89c8\u5668\u8bbf\u95ee\u7684\u5185\u5bb9\u653e\u5728\u516c\u5f00\u76ee\u5f55\u4e2d\uff0c\u5c31\u4e0d\u9700\u8981\u989d\u5916\u4f7f\u7528.htaccess\u7b49\u6587\u4ef6\u6765\u9650\u5236\u8bbf\u95ee\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nc\">ServerName<\/span> example.com\r\n<span class=\"nc\">DocumentRoot<\/span> \/path\/to\/example.com\/www\r\n\r\n<span class=\"c\"># example.com \u252c www(\u516c\u958b) \u252c index.php<\/span>\r\n<span class=\"c\">#             \u2502           \u2514 img \u252c 111.jpg<\/span>\r\n<span class=\"c\">#             \u2502                  \u2514 222.png<\/span>\r\n<span class=\"c\">#             \u2514 _data(\u975e\u516c\u958b) \u252c aaa.ini<\/span>\r\n<span class=\"c\">#                              \u2514 bbb.log<\/span>\r\n<\/code><\/pre>\n<hr \/>\n<h2>4. \u7528\u6237\u4f17\u591a<br \/>\nWordPress\u662f\u5168\u4e16\u754c\u6700\u5e38\u7528\u7684\u5185\u5bb9\u7ba1\u7406\u7cfb\u7edf\uff08CMS\uff09\u3002<\/p>\n<p>\u7531\u4e8e\u88ab\u5439\u5618\u4e3a\u9002\u7528\u4e8e\u4efb\u4f55\u4eba\u7684\u7b80\u6613\u6027\uff0c\u56e0\u6b64\u5728\u5176\u4e2d\u4e5f\u6709\u5f88\u591a\u4eba\u51e0\u4e4e\u6ca1\u6709\u5b89\u5168\u610f\u8bc6\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5347\u7ea7\u88ab\u5ffd\u7565 \u2252 \u6f0f\u6d1e\u88ab\u5ffd\u7565 \u21d2 \u7f51\u7ad9\u7be1\u6539 \u21d2 \u653b\u51fb\u8df3\u677f \u21d2 \u7be1\u6539\u53e6\u4e00\u4e2a\u5177\u6709\u6f0f\u6d1e\u7684WordPress\u2026 \u5bfc\u81f4\u4e86\u8d1f\u9762\u8fde\u9501\u53cd\u5e94\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u6839\u636e\u670d\u52a1\u5668\u65e5\u5fd7\u8ffd\u8e2a\u653b\u51fb\u6765\u6e90\u65f6\uff0c\u7ecf\u5e38\u53d1\u73b0WordPress\u53d7\u5230\u7be1\u6539\uff0c\u5e76\u88ab\u7528\u4f5c\u8df3\u677f\u3002<\/p>\n<p>\u5728\u4e25\u91cd\u7684\u60c5\u51b5\u4e0b\uff0c\u540c\u4e00\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684\u6240\u6709 WordPress \u7f51\u57df\u53ef\u80fd\u4f1a\u906d\u5230\u7be1\u6539\u3002<\/p>\n<hr \/>\n<h3>4-1. \u793a\u4f8b\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f8b\u5b50\uff0c\u6d89\u53ca\u6211\u6240\u7ba1\u7406\u7684\u670d\u52a1\u5668\u4e0a\u53d7\u5230\u5927\u91cf\u6076\u610f\u8bf7\u6c42\u7684\u7be1\u6539\u53d7\u5bb3WordPress\u7684HTML\u6e90\u4ee3\u7801\u3002<\/p>\n<p>\u4e3a\u4e86\u907f\u514d\u4ee3\u7801\u88ab\u9632\u75c5\u6bd2\u8f6f\u4ef6\u68c0\u6d4b\u5230\uff0c\u6211\u8fdb\u884c\u4e86\u5927\u90e8\u5206\u7684\u7701\u7565\u548c\u9690\u85cf\uff0c\u5e76\u5bf9\u90e8\u5206\u8fdb\u884c\u4e86\u6574\u7406\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\">&lt;!-- eval()\u304c\u3042\u308b\u6642\u70b9\u3067\u60aa\u3044\u4e88\u611f\u3057\u304b\u3057\u307e\u305b\u3093 --&gt;<\/span>\r\n<span class=\"nt\">&lt;head&gt;<\/span>\r\n<span class=\"nt\">&lt;script&gt;<\/span><span class=\"nb\">eval<\/span><span class=\"p\">(<\/span><span class=\"nb\">String<\/span><span class=\"p\">.<\/span><span class=\"nx\">fromCharCode<\/span><span class=\"p\">(<\/span><span class=\"err\">\u25cb<\/span><span class=\"p\">,<\/span> <span class=\"err\">\u25cb<\/span><span class=\"p\">,<\/span> <span class=\"err\">\u25cb<\/span><span class=\"p\">,<\/span> <span class=\"p\">...<\/span><span class=\"nx\">\u7565<\/span><span class=\"nt\">&lt;\/script&gt;<\/span>\r\n<span class=\"nt\">&lt;script <\/span><span class=\"na\">async<\/span> <span class=\"na\">src=<\/span><span class=\"s\">'https:\/\/\u25cbagle\u25cb.x\u25cbz\/ds.js&amp;'<\/span><span class=\"nt\">&gt;&lt;\/script&gt;<\/span>\r\n<span class=\"nt\">&lt;script <\/span><span class=\"na\">async<\/span> <span class=\"na\">src=<\/span><span class=\"s\">'https:\/\/\u25cbome\u25cbpage.com\/\u25cb\u25cb?frm=script&amp;_cid=\u25cb'<\/span><span class=\"nt\">&gt;&lt;\/script&gt;<\/span>\r\n<\/code><\/pre>\n<p>\u6b64\u7f51\u7ad9\u62e5\u6709WordPress 4.5.2\u7248\u672c\u4e14\u672a\u8fdb\u884c\u5347\u7ea7\uff0c\u6b64\u5916\u8fd8\u4f7f\u7528\u4e86\u6709\u4e25\u91cd\u6f0f\u6d1e\u7684\u63d2\u4ef6\u3002<\/p>\n<p>\u5373\u4f7f\u6536\u5230\u4e86\u5f88\u591a\u4e0d\u6b63\u8bf7\u6c42\uff0c\u53ea\u8981\u91c7\u53d6\u4e86\u9002\u5f53\u7684\u9632\u8303\u63aa\u65bd\uff0c\u670d\u52a1\u5668\u7684\u65e5\u5fd7\u53ea\u4f1a\u7a0d\u5fae\u88ab\u6c61\u67d3\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5982\u679c\u5bf9WordPress\u7248\u672c\u5347\u7ea7\u6216\u63d2\u4ef6\u7684\u6f0f\u6d1e\u7b49\u95ee\u9898\u7f6e\u4e4b\u4e0d\u7406\uff0c\u90a3\u4e48\u53d7\u5230\u975e\u6cd5\u8bf7\u6c42\u7684WordPress\u4e5f\u53ef\u80fd\u4f1a\u906d\u5230\u7be1\u6539\u635f\u5bb3\u3002<\/p>\n<hr \/>\n<h3>4-2.\u867d\u7136\u6709\u4e00\u4e9b\u4f18\u70b9\uff0c\u4f46\u662f&#8230;\u7528\u6237\u4f17\u591a=\u610f\u5473\u7740\u4fe1\u606f\u4e30\u5bcc\u3002<\/p>\n<p>\u5728\u56f0\u6270\u65f6\uff0c\u7a0d\u5fae\u641c\u7d22\u4e00\u4e0b\u5c31\u4f1a\u6709\u5f88\u591a\u4fe1\u606f\u51fa\u73b0\uff0c\u8fd9\u4e5f\u88ab\u79f0\u4e3a\u4e00\u4e2a\u4f18\u70b9\u3002<\/p>\n<p>\u7136\u800c\uff0cPHP \u9886\u57df\u7684\u4fe1\u606f\uff08\u5c24\u5176\u662f\u65e7\u7684\u4fe1\u606f\uff09\u662f\u4e00\u7247\u6df7\u4e71\u3002<\/p>\n<p>\u52a8\u4e86\uff08\u597d\u50cf\uff09\u5c31\u53ef\u4ee5\u4e86\uff01\u8fd9\u6837\u5199\u7684\u4ee3\u7801\u6709\u95ee\u9898\uff0c\u6216\u8005\u53ea\u662f\u5e94\u6025\u63aa\u65bd\u63a9\u76d6\u4e86\u81ed\u5473\u7b49\u7b49\uff0c\u53ef\u80fd\u4f1a\u88ab\u4ecb\u7ecd\u6210\u6700\u4f73\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u800c\u4e14\u8fd8\u88ab\u590d\u5236\u7c98\u8d34\u5e7f\u4f20\u3002<\/p>\n<p>\u4e86\u89e3\u5982\u4e0b: \u4e86\u89e3\u5982\u4e0b\uff1a\u6709\u5f88\u591a\u4fe1\u606f\u5e76\u4e0d\u4ec5\u4ec5\u6709\u76ca\uff0c\u4e5f\u5305\u62ec\u4e0d\u6613\u8fa8\u522b\u6b63\u786e\u4e0e\u9519\u8bef\u4e4b\u5904\uff0c\u5c24\u5176\u5bf9\u4e8e\u521d\u5b66\u8005\u800c\u8a00\uff0c\u4ed6\u4eec\u53ef\u80fd\u65e0\u6cd5\u5224\u65ad\u4fe1\u606f\u7684\u771f\u5047\uff0c\u8fd9\u662f\u9700\u8981\u4e86\u89e3\u7684\u7f3a\u70b9\u3002\u5c24\u5176\u8981\u6ce8\u610f\u65e7\u4fe1\u606f\u3002<\/p>\n<p>\u4f5c\u4e3a\u4e00\u540dPHP\u7a0b\u5e8f\u5458\uff0c\u8fd9\u79cd\u60c5\u51b5\u975e\u5e38\u4ee4\u4eba\u60b2\u4f24\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u901a\u5e38\u4f1a\u63d0\u4f9b\u4e00\u4e9b\u9002\u7528\u4e8e\u521d\u5b66\u8005\u5e76\u53ef\u76f4\u63a5\u590d\u5236\u7c98\u8d34\u4f7f\u7528\u7684\u7b80\u5355\u4ee3\u7801\uff0c\u6240\u4ee5\u6211\u5c06\u683c\u5916\u6ce8\u610f\u8fd9\u4e9b\u65b9\u9762\u3002<\/p>\n<hr \/>\n<h2>5. \u6e90\u4ee3\u7801\u5df2\u516c\u5f00WordPress\u662f\u4e00\u79cd\u5f00\u6e90\u8f6f\u4ef6\u3002<\/p>\n<p>\u7531\u4e8e\u8be5\u4ee3\u7801\u5df2\u7ecf\u5bf9\u5168\u7403\u4f18\u79c0\u7684\u6280\u672f\u4eba\u5458\u5f00\u653e\uff0c\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\uff0cBug\u4f1a\u7acb\u5373\u88ab\u62a5\u544a\u5e76\u8fc5\u901f\u5f97\u5230\u89e3\u51b3\u3002<\/p>\n<p>\u9019\u662f\u4e00\u500b\u6975\u5177\u512a\u52e2\u7684\u7279\u9ede\uff0c\u73fe\u4eca\u7db2\u7d61\u670d\u52d9\u6240\u4f9d\u8cf4\u7684\u8a31\u591a\u6280\u8853\u90fd\u662f\u57fa\u65bc\u958b\u6e90\u958b\u767c\u7684\u3002<\/p>\n<p>\u7136\u800c\uff0c\u8fd9\u4e5f\u610f\u5473\u7740\u6076\u610f\u7684\u4eba\u53ef\u4ee5\u81ea\u7531\u9605\u8bfb\u4ee3\u7801\uff0c\u5373\u4f7f\u4ee3\u7801\u5df2\u7ecf\u4fee\u6b63\u597d\u4e86\uff0c\u5982\u679c\u8fd0\u8425\u4eba\u5458\u4e0d\u53ca\u65f6\u5347\u7ea7\u7248\u672c\uff0c\u52a3\u52bf\u5c06\u4f1a\u53d8\u5f97\u66f4\u5927\u3002<\/p>\n<hr \/>\n<h2>6. \u8fd9\u662f\u5168\u7403\u6700\u6613\u53d7\u5230\u653b\u51fb\u7684\u5185\u5bb9\u7ba1\u7406\u7cfb\u7edf\u3002\u51fa\u4e8e\u4ee5\u4e0a\u7406\u7531\uff0c\u5bf9\u4e8e\u6709\u6076\u610f\u7684\u4eba\u6765\u8bf4\uff0cWordPress \u6210\u4e3a\u4e86\u4e00\u4e2a\u7406\u60f3\u7684\u76ee\u6807\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u5f53\u4f60\u67e5\u770b\u75c5\u6bd2\u9632\u62a4\u8f6f\u4ef6\u201c\u5371\u9669\u201d\u8b66\u544a\u7684URL\u7684HTML\u6e90\u4ee3\u7801\u65f6\uff0c\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u662f\u50cf\u524d\u97624-1\u4e2d\u4ecb\u7ecd\u7684\u90a3\u6837\uff0c\u662fWordPress\u906d\u53d7\u4e86\u7be1\u6539\u635f\u5bb3\u3002<\/p>\n<hr \/>\n<h3>\u91cd\u65b0\u5ba1\u89c6\u4f7f\u7528\u7684\u65b9\u6cd5\u5373\u4f7f\u662f\u88ab\u8a8d\u70ba\u5177\u6709\u512a\u9ede\u7684\u4e8b\u7269\uff0c\u6839\u64da\u64cd\u4f5c\u8005\u7684\u4e0d\u540c\u53ef\u80fd\u6703\u6210\u70ba\u4e00\u500b\u5de8\u5927\u7684\u7f3a\u9ede\u3002<\/p>\n<ol>\u6211\u6ca1\u6709\u670d\u52a1\u5668\u77e5\u8bc6\uff0c\u53ea\u80fd\u4f7f\u7528\u6258\u7ba1\u670d\u52a1\u5668\u3002\u6211\u5e76\u6ca1\u6709\u4e13\u6ce8\u4e8eWordPress\uff0c\u800c\u662f\u4f7f\u7528\u901a\u7528\u7684\u6258\u7ba1\u670d\u52a1\u5668\u3002\u6211\u901a\u8fc7\u4e0b\u8f7dzip\u6587\u4ef6\u7136\u540e\u901a\u8fc7FTP\u4e0a\u4f20\u7684\u65b9\u5f0f\u8fdb\u884c\u8bbe\u7f6e\u3002\u7248\u672c\u66f4\u65b0\u57fa\u672c\u4e0a\u662f\u624b\u52a8\u901a\u8fc7WordPress\u7ba1\u7406\u754c\u9762\u8fdb\u884c\u7684\u3002<\/ol>\n<p>\u5982\u679c\u4ee5\u4e0a\u90fd\u9002\u7528\u4e8e\u60a8\uff0c\u6211\u5e76\u4e0d\u8868\u793a\u60a8\u5e94\u8be5\u4e0d\u4f7f\u7528WordPress\u3002<\/p>\n<p>\u5982\u679c\u4f60\u5728Google\u4e0a\u641c\u7d22\u4e00\u4e0b\uff0c\u5e94\u8be5\u80fd\u627e\u5230\u4e00\u4e9b\u63d0\u4f9b\u9488\u5bf9WordPress\u8fd0\u8425\u8fdb\u884c\u8c03\u6574\u548c\u5b89\u5168\u9632\u62a4\u7684\u4e13\u95e8\u79df\u8d41\u670d\u52a1\u7684\u5730\u65b9\u3002<\/p>\n<p>\u5728\u8fd9\u79cd\u670d\u52a1\u4e2d\uff0c\u53ea\u9700\u8981\u901a\u8fc7\u7f51\u7edc\u6d4f\u89c8\u5668\u8fdb\u884c\u7b80\u5355\u64cd\u4f5c\uff0c\u5c31\u53ef\u4ee5\u89e3\u51b3WordPress\u7684\u95ee\u9898\uff0c\u56e0\u6b64\u6211\u4eec\u5efa\u8bae\u9996\u5148\u4ece\u8fd0\u8425\u73af\u5883\u8fdb\u884c\u5ba1\u89c6\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u6211\u8ba4\u4e3a\u6211\u4eec\u8fd8\u9700\u8981\u5c0f\u5fc3\u90a3\u4e9b\u4e0d\u7ecf\u8fc7\u98ce\u9669\u548c\u7f3a\u70b9\u8bf4\u660e\u5c31\u8f7b\u6613\u63a8\u8350WordPress\u7684\u516c\u53f8\u3002<\/p>\n<hr \/>\n<h2>7. \u91cd\u7684WordPress\u662f\u4e00\u4e2a\u975e\u5e38\u5360\u7528\u8d44\u6e90\u7684\u5185\u5bb9\u7ba1\u7406\u7cfb\u7edf\u3002<\/p>\n<p>\u751f\u6210\u52a8\u6001\u5185\u5bb9\u81ea\u7136\u9700\u8981\u4ed8\u51fa\u4e00\u5b9a\u7684\u6210\u672c\uff0c\u4f46WordPress\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u6302\u94a9\u6765\u5b9e\u73b0\u3002\u968f\u7740\u63d2\u4ef6\u7684\u589e\u52a0\uff0c\u5b83\u4e5f\u4f1a\u53d8\u5f97\u660e\u663e\u8f83\u91cd\u3002<\/p>\n<p>\u91cd\u91cf\u5927\u7684\u610f\u601d\u662f\u6307\u663e\u793a\u901f\u5ea6\u6162\uff0c\u800c\u4e14\u5bb9\u6613\u53d7\u5230\u8fc7\u8f7d\u7684\u5f71\u54cd\u3002<\/p>\n<hr \/>\n<h3>7-1. \u7b80\u5355\u7684\u57fa\u51c6\u6d4b\u8bd5 de\u5728\u5b89\u88c5\u4e86Apache\u7684\u73af\u5883\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528ab\u547d\u4ee4\uff08Apache Bench\uff09\u6765\u8fdb\u884c\u7b80\u4fbf\u7684\u57fa\u51c6\u6d4b\u8bd5\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Apache 2.4.39<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MariaDB 10.3.15<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">PHP 7.3.6<\/ul>\n<\/li>\n<\/ul>\n<p>WordPress 5.2.1<\/p>\n<p>\u6211\u5c1d\u8bd5\u5728\u67d0VPS\u7684\u6700\u4fbf\u5b9c\u5957\u9910\u4e0a\u642d\u5efa\u4e86\u4e0a\u8ff0\u73af\u5883\uff0c\u5e76\u5c3d\u91cf\u5c06\u5176\u4fdd\u6301\u5728\u539f\u6c41\u539f\u5473\u7684\u72b6\u6001\u4e0b\u8fdb\u884c\u5b9e\u9a8c\u3002<\/p>\n<p>WordPress \u662f\u4e00\u4e2a\u53ea\u8fdb\u884c\u4e86\u6700\u57fa\u672c\u8bbe\u7f6e\u7684\u72b6\u6001\uff0c\u53ea\u663e\u793a &#8220;Hello world!&#8221; \uff08\u63d2\u4ef6\u548c\u4e3b\u9898\u4fdd\u6301\u9ed8\u8ba4\u72b6\u6001\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span>\/path\/to\/apache\/bin\/ab <span class=\"nt\">-c<\/span> 10 <span class=\"nt\">-n<\/span> 100 http:\/\/...\r\n\r\n<span class=\"c\">#-- yum\u306a\u3069\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30b9\u306e\u901a\u3063\u305f\u74b0\u5883\u306a\u3089 ab \u3060\u3051\u3067\u4f7f\u3048\u307e\u3059<\/span>\r\n<span class=\"c\"># $ ab -c 10 -n 100 http:\/\/...<\/span>\r\n\r\n<span class=\"c\">#-- Window \u74b0\u5883\u3067\u3082\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089\u7c21\u5358\u306b\u4f7f\u3048\u307e\u3059<\/span>\r\n<span class=\"c\"># C:\\path\\to\\apache\\bin\\ab -c 10 -n 100 http:\/\/...<\/span>\r\n<\/code><\/pre>\n<hr \/>\n<h3>7-2. \u7ed3\u679c\u7531\u4e8e\u6bcf\u79d2\u8bf7\u6c42\u6570\uff08\u5373\u6bcf\u79d2\u5904\u7406\u4e86\u591a\u5c11\u4e2a\u8bf7\u6c42\uff09\u5f88\u5bb9\u6613\u7406\u89e3\uff0c\u56e0\u6b64\u6211\u9009\u62e9\u4e86\u4ece\u4e00\u4e9b\u670d\u52a1\u5668\u4e0a\u591a\u6b21\u5c1d\u8bd5\u7684\u7ed3\u679c\u4e2d\u63d0\u53d6\u4e86\u4ec5\u4ec53\u4e2a\u5b9e\u4f8b\u3002<\/p>\n<h4>7-2-1. WordPress<br \/>\n7-2-1. WordPress<\/p>\n<pre class=\"post-pre\"><code>Requests per second:    2.90 [#\/sec] (mean)\r\nRequests per second:    2.18 [#\/sec] (mean)\r\nRequests per second:    1.28 [#\/sec] (mean)\r\n<\/code><\/pre>\n<h4>7-2-2.\u539f\u59cb\u7684 HTML\u8fd9\u662f\u4e00\u4e2a\u8f93\u51fa\u4e0eWordPress\u76f8\u540c\u5185\u5bb9\u7684HTML\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>Requests per second:    489.61 [#\/sec] (mean)\r\nRequests per second:    474.17 [#\/sec] (mean)\r\nRequests per second:    339.36 [#\/sec] (mean)\r\n<\/code><\/pre>\n<h4>7-2-3. PHP\u7684\u57fa\u672c\u8bed\u6cd5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c1\">\/\/-- \u2193\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u306f\u3001\u7d20\u306eHTML\u3068\u307b\u307c\u540c\u3058\u7d50\u679c\u3067\u3057\u305f<\/span>\r\n<span class=\"k\">echo<\/span> <span class=\"sh\">&lt;&lt;&lt;'__HTML__'\r\nWordPress\u304c\u51fa\u529b\u3059\u308b\u3082\u306e\u3068\u540c\u3058HTML\r\n__HTML__;<\/span>\r\n<\/code><\/pre>\n<p>\u5b8c\u5168\u6ca1\u6709\u8fdb\u884c\u4efb\u4f55\u8c03\u6574\u7684\u60c5\u51b5\u4e0b\uff0c\u901f\u5ea6\u6bd4\u9884\u671f\u7684\u8fd8\u8981\u6162(\u6c57)\u3002<\/p>\n<hr \/>\n<h3>7-3. \u8ba9\u6211\u4eec\u5145\u5206\u5229\u7528\u73b0\u91d1\u3002\u5c24\u5176\u662f\u5728\u535a\u5ba2\u4e2d\uff0c\u4ece\u6570\u636e\u5e93\u4e2d\u8bfb\u53d6\u6570\u636e\u5e76\u751f\u6210HTML\u9875\u9762\u7684\u8fc7\u7a0b\uff08\u535a\u5ba2\u7684\u5c55\u793a\uff09\u6bd4\u6570\u636e\u5e93\u66f4\u65b0\uff08\u535a\u5ba2\u7684\u66f4\u65b0\uff09\u7684\u8fc7\u7a0b\u8981\u591a\u5f97\u591a\u3002<\/p>\n<p>\u5982\u679c\u535a\u5ba2\u7684\u5185\u5bb9\u6ca1\u6709\u66f4\u65b0\uff0c\u751f\u6210\u7684HTML\u6bcf\u6b21\u90fd\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p>\u5982\u679c\u5c06\u751f\u6210\u7ed3\u679c\u7f13\u5b58\u5e76\u663e\u793a\uff0c\u4f1a\u66f4\u5feb\uff0c\u5bf9\u5427\uff1f\u76f8\u53cd\uff0c\u82e5\u7ecf\u8fc7\u7a0b\u5e8f\u6216\u6570\u636e\u5e93\uff0c\u5219\u4f1a\u53d8\u6162\u76f8\u5e94\u7684\u65f6\u95f4\u3002\u7279\u522b\u662f\u6570\u636e\u5e93\u65b9\u9762\u5bb9\u6613\u6210\u4e3a\u74f6\u9888\u300212<\/p>\n<p>\u5982\u679c\u6211\u4eec\u79ef\u6781\u5f15\u5165\u7f13\u5b58\u673a\u5236\uff0c\u5305\u62ec\u52a0\u5f3a\u4f7f\u7528CDN\uff0c\u53ef\u4ee5\u5728\u901f\u5ea6\u65b9\u9762\u83b7\u5f97\u663e\u8457\u7684\u6548\u679c\u3002<\/p>\n<p>\u5f88\u9057\u61be\uff0cWordPress\u9ed8\u8ba4\u6ca1\u6709\u8fd9\u6837\u7684\u673a\u5236\u3002<\/p>\n<hr \/>\n<h3>7-4. \u8349\u8599\u4f5c\u4e3a\u4e00\u79cd\u7ecf\u8fc7\u591a\u79cd\u8c03\u6574\u7684 WordPress \u8fd0\u884c\u73af\u5883\uff0c\u8fd8\u6709\u4e00\u79cd\u540d\u4e3a KUSANAGI \u7684\u9009\u62e9\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5bf9\u6b64\u611f\u5174\u8da3\uff0c\u8bf7\u8003\u8651\u5f15\u5165\u3002<\/p>\n<hr \/>\n<p>\u203b\u4ee5\u4e0b\u7684\u5185\u5bb9\u4e0e\u4e3b\u9898\u65e0\u5173\u3002<\/p>\n<hr \/>\n<h2>8. \u5c0d\u65bc\u751c\u871c\u7684\u8ca1\u5229\u8aaa\u8fad\uff0c\u8acb\u6ce8\u610f\u3002\u6709\u8bb8\u591a\u58f0\u79f0\u300c\u53ea\u8981\u7528WordPress\u5c31\u80fd\u8f7b\u677e\u8d5a\u94b1\u7684\u535a\u5ba2\uff01\u300d\u7684\u4eba\uff0c\u4f46\u636e\u8bf4\u80fd\u591f\u901a\u8fc7\u8054\u76df\u8425\u9500\u6bcf\u6708\u8d5a\u53d61\u4e07\u65e5\u5143\u7684\u4eba\u53ea\u5360\u603b\u4f53\u7684\u4e0d\u5230\u767e\u5206\u4e4b\u51e0\u3002<\/p>\n<p>\u4f60\u4e0d\u9700\u8981\u8d39\u52b2\u5730\u5411\u5b8c\u5168\u964c\u751f\u7684\u4eba\u900f\u9732\u8d5a\u94b1\u7684\u4fe1\u606f\u3002\u6240\u4ee5\uff0c\u6211\u8ba4\u4e3a\u4f60\u5e94\u8be5\u597d\u597d\u8003\u8651\u4e00\u4e0b\u4e3a\u4ec0\u4e48\u8981\u516c\u5f00\u4fe1\u606f\u3002<\/p>\n<p>\u8bf7\u52a1\u5fc5\u6ce8\u610f\uff0c\u4e0d\u8981\u88ab\u8425\u9500\u4ea7\u54c1\u7b49\u6240\u9a97\u3002<\/p>\n<hr \/>\n<h2>9. \u5173\u4e8eSEO<br \/>\n\u6709\u4eba\u8ba4\u4e3aWordPress\u5728SEO\u65b9\u9762\u5f88\u5f3a\u5927\uff0c\u4f46\u6211\u8ba4\u4e3a\u8fd9\u53ea\u5bf9\u4e00\u534a\u6b63\u786e\uff0c\u4e00\u534a\u9519\u8bef\u3002<\/p>\n<p>\u6beb\u65e0\u7591\u95ee\uff0cWordPress\u53ef\u4ee5\u5f3a\u6709\u529b\u5730\u652f\u6301\u201c\u5411\u641c\u7d22\u5f15\u64ce\u722c\u866b\u4f20\u9012\u4fe1\u606f\u662f\u66f4\u597d\u7684\u65b9\u6cd5\u201d\u8fd9\u4e00\u60f3\u6cd5\uff0c\u800c\u65e0\u9700\u8fc7\u591a\u601d\u8003\u590d\u6742\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u5c24\u5176\u5bf9\u4e8e\u521d\u5b66\u8005\u800c\u8a00\uff0c\u8fd9\u65e0\u7591\u662f\u4e00\u4e2a\u5de8\u5927\u7684\u4f18\u52bf\u3002<\/p>\n<hr \/>\n<h3>9-1. \u4e0d\u662f\u4ec0\u9ebc\u7279\u5225\u7684\u4e8b\u60c5\u4f46\u662f\uff0c\u8fd9\u53ea\u662f\u4e00\u4e2a\u88ab\u79f0\u4e3a&#8221;\u6280\u672f\u6027SEO&#8221;\u7684\u90e8\u5206\uff0c\u610f\u601d\u662f\u8981\u9075\u5b88\u8fd9\u4e9b\u89c4\u5219\uff0c\u7edd\u5bf9\u4e0d\u662f&#8221;\u53ea\u6709WordPress\u624d\u80fd\u505a\u7684\u7279\u6b8a\u4e8b\u60c5&#8221;\u3002<\/p>\n<p>\u4f5c\u4e3aSEO\u65b9\u9762\u7684\u8bc1\u636e\uff0c\u7ecf\u5e38\u4f1a\u63d0\u5230Google\u7684Matt Cutts\u5148\u751f\u8d5e\u7f8eWordPress\u7684\u65e7\u6587\u7ae0\u3002<\/p>\n<p>\u6c0f\u6240\u79f0\u8d5e\u7684\u662f\uff0cWordPress \u5fe0\u5b9e\u5730\u9075\u5b88\u4e86\u201c\u5411Google\u722c\u866b\u4f20\u8fbe\u89c4\u5219\u201d\u7684\u8981\u6c42\u3002<\/p>\n<p>\u6211\u8ba4\u4e3a\u5c06SEO\u63cf\u8ff0\u4e3a&#8221;\u5f3a\u5927&#8221;\u662f\u4e00\u79cd\u8bef\u89e3\u7684\u8868\u8fbe\u65b9\u5f0f\u3002<\/p>\n<p>\u5982\u679c\u6709\u4e13\u4e1a\u77e5\u8bc6\u7684\u4eba\uff0c\u8fd9\u662f\u4ed6\u4eec\u81ea\u53e4\u4ee5\u6765\u4e00\u76f4\u9075\u5b88\u7684\u4e8b\u60c5\uff0c\u6240\u4ee5\u4e0d\u8981\u8bef\u89e3\u8fd9\u4e00\u70b9\u3002<\/p>\n<hr \/>\n<h3>9-2. \u641c\u7d22\u5f15\u64ce\u7684\u76ee\u6807\u662f\u4ec0\u4e48\uff1f\u641c\u7d22\u5f15\u64ce\u7684\u4f7f\u547d\u662f\u201c\u8ba9\u4eba\u4eec\u66f4\u5bb9\u6613\u627e\u5230\u6709\u7528\u7684\u4fe1\u606f\u201d\uff0c\u5982\u679c\u4e0d\u80fd\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u5c31\u6ca1\u6709\u4eba\u4f1a\u518d\u4f7f\u7528\u641c\u7d22\u5f15\u64ce\u4e86\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u4ece\u5f88\u4e45\u4ee5\u524d\u5f00\u59cb\uff0c\u201c\u4fe1\u606f\u7684\u8d28\u91cf\u201d\u548c\u201c\u80fd\u591f\u8212\u9002\u5b89\u5168\u5730\u6d4f\u89c8\u9875\u9762\u201d\u53d8\u5f97\u975e\u5e38\u91cd\u8981\uff0c\u8fd9\u662f\u975e\u5e38\u81ea\u7136\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u5373\u4f7f\u641c\u7d22\u5f15\u64ce\u7684\u7b97\u6cd5\u53d1\u751f\u4e9b\u8bb8\u53d8\u5316\uff0c\u8fd9\u4e2a\u6839\u672c\u90e8\u5206\u4ecd\u7136\u4e0d\u4f1a\u6539\u53d8\u3002<\/p>\n<p>\u4f60\u4f1a\u60f3\u8981\u67e5\u770b\u4e00\u4e2a\u6ca1\u6709\u4ec0\u4e48\u5b9e\u8d28\u5185\u5bb9\u7684\u5efa\u7acb\u5728WordPress\u4e0a\u7684\u8d5a\u6d41\u91cf\u535a\u5ba2\u5417\uff1f\u641c\u7d22\u5f15\u64ce\u4e5f\u5728\u4e0d\u65ad\u6f14\u8fdb\uff0c\u4ee5\u4e0e\u4eba\u7c7b\u4e00\u6837\u8fdb\u884c\u5224\u65ad\u3002<\/p>\n<p>\u6211\u89c9\u5f97SEO\uff08\u7279\u522b\u662f\u6280\u672f\u65b9\u9762\uff09\u6709\u4e00\u79cd\u7c7b\u4f3c\u5b97\u6559\u7684\u7279\u70b9\u3002<\/p>\n<p>\u8bf7\u628a\u4ee5&#8221;SEO&#8221;\u4e4b\u540d\u6295\u5165\u7684\u65f6\u95f4\u548c\u91d1\u94b1\uff0c\u662f\u5426\u8003\u8651\u82b1\u8d39\u5728\u63d0\u4f9b\u66f4\u9ad8\u8d28\u91cf\u7684\u5185\u5bb9\u4e0a\u4f1a\u66f4\u6709\u610f\u4e49\u5462\uff0c\u8bf7\u597d\u597d\u60f3\u4e00\u60f3\u3002<\/p>\n<p>\u4e5f\u8bb8\u9664\u4e86WordPress\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u505a\u5176\u4ed6\u7684\u4e8b\u60c5\u3002<\/p>\n<div>2019\u5e744\u6708\uff0c\u7ec8\u4e8e\u6210\u4e3a\u4e86\u5fc5\u987b\u8981\u6c42\u4f7f\u7528PHP5.6\u3002\u867d\u7136\u81ea\u4ece\u5f15\u5165\u4e86\u547d\u540d\u7a7a\u95f4\u548c\u95ed\u5305\u4e4b\u540e\uff0c\u5df2\u7ecf\u8fc7\u53bb\u4e86\u5927\u7ea610\u5e74\u3002\u636e\u8bf4\u8fd9\u662fWordPress\u5386\u53f2\u4e0a\u6700\u7cdf\u7cd5\u7684\u6f0f\u6d1e\uff0c150\u4e07\u4e2a\u4ee5\u4e0a\u7684\u7f51\u7ad9\u53d7\u5230\u4e86\u7be1\u6539\u7684\u5f71\u54cd\u3002\u56e0\u6b64\uff0c\u8bb8\u591aPHP\u5f00\u53d1\u8005\u4e00\u770b\u5230\u9891\u7e41\u4f7f\u7528require_once\uff0c\u5c31\u4f1a\u6709\u4e0d\u597d\u7684\u9884\u611f\uff08\u7b11\uff09\u3002\u5f88\u591a\u4ee3\u7801\u6ca1\u6709\u5b9e\u73b0\u903b\u8f91\u548c\u8bbe\u8ba1\u7684\u5206\u79bb\uff0c\u6211\u8ba4\u4e3a\u8fd9\u4e5f\u52a0\u5267\u4e86\u8fd9\u4e00\u73b0\u8c61\u3002\u73b0\u5728\u4ecd\u7136\u6709\u4eba\u8ba4\u4e3a&#8221;PHP\u672c\u8eab\u5c31\u662f\u6a21\u677f\u5f15\u64ce\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u989d\u5916\u7684\u6a21\u677f\u5f15\u64ce&#8221;\u3002\u5982\u4f55\u7406\u89e3\u8fd9\u4e2a\u89c2\u70b9\u53d6\u51b3\u4e8e\u4e2a\u4eba\u3002\u5b9e\u9645\u4e0a\uff0c\u867d\u7136\u53ef\u80fd\u5b58\u5728\uff0c\u4f46\u5f88\u591a\u9519\u8bef\u90fd\u4ee5\u81f4\u547d\u9519\u8bef\u544a\u7ec8\uff0c\u5982\u679c\u80fd\u5c06\u9519\u8bef\u4f5c\u4e3a\u5f02\u5e38\u5904\u7406\uff0c\u5c31\u7b97\u662f\u6bd4\u8f83\u6b63\u5e38\u7684\u65b9\u5f0f\u3002\u6807\u8bb0\uff08\u7b11\uff09\u3002\u5728\u8fd9\u79cdWordPress\u670d\u52a1\u5668\u4e0a\uff0c\u7b2c\u4e09\u65b9\u4e5f\u5f88\u5bb9\u6613\u67e5\u51faWordPress\u7684\u7248\u672c\u548c\u4f7f\u7528\u4e86\u54ea\u4e9b\u63d2\u4ef6\u3002\u5728\u65e7\u7684\u8bbe\u8ba1\u4e2d\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u770b\u5230\u4e3a\u4e86\u5b9e\u73b0\u5b83\u800c\u4f5c\u51fa\u7684\u8270\u82e6\u52aa\u529b\u3002\u5b83\u4e5f\u9002\u7528\u4e8eWindows\u548cMacintosh\u73af\u5883\u3002\u4e0e\u6b64\u540c\u65f6\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8c03\u4f18\u6765\u83b7\u5f97\u66f4\u5927\u7684\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u636e\u6211\u6240\u77e5\uff0c\u5728\u8857\u4e0a\uff0c\u6700\u8fd1\u6d41\u884c\u5728WordPress\u4e2d\u521b\u5efaAffiliate Blog\u3002\u7136\u800c\uff0c\u4ecePHP\u5f00\u53d1\u8005\u548c\u670d\u52a1\u5668 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-26494","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010wordpress\u3011wordpress\u6709\u54ea\u4e9b\u7f3a\u70b9\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010wordpress\u3011wordpress\u6709\u54ea\u4e9b\u7f3a\u70b9\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-05T06:11:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T13:34:04+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/\",\"name\":\"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-08-05T06:11:50+00:00\",\"dateModified\":\"2025-08-11T13:34:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"description\":\"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010wordpress\u3011wordpress\u6709\u54ea\u4e9b\u7f3a\u70b9\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9","og_description":"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010wordpress\u3011wordpress\u6709\u54ea\u4e9b\u7f3a\u70b9\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-05T06:11:50+00:00","article_modified_time":"2025-08-11T13:34:04+00:00","author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/","name":"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-08-05T06:11:50+00:00","dateModified":"2025-08-11T13:34:04+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"description":"\u5173\u4e8e\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010WordPress\u3011WordPress\u6709\u54ea\u4e9b\u7f3a\u70b9"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90wordpress%e3%80%91wordpress%e6%9c%89%e5%93%aa%e4%ba%9b%e7%bc%ba%e7%82%b9\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=26494"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26494\/revisions"}],"predecessor-version":[{"id":110985,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26494\/revisions\/110985"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=26494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=26494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=26494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}