{"id":293,"date":"2026-11-02T12:04:58","date_gmt":"2026-11-02T04:04:58","guid":{"rendered":"http:\/\/laoke.pw\/?p=293"},"modified":"2026-11-02T12:04:58","modified_gmt":"2026-11-02T04:04:58","slug":"255-laragon-%e6%8a%8a-php%e3%80%81mysql%e3%80%81nginx-%e5%a1%9e%e8%bf%9b%e4%b8%80%e4%b8%aa%e7%bb%bf%e8%89%b2%e6%96%87%e4%bb%b6%e5%a4%b9%ef%bc%8c%e5%8f%8c%e5%87%bb%e5%b0%b1%e8%83%bd","status":"publish","type":"post","link":"http:\/\/laoke.pw\/?p=293","title":{"rendered":"255 Laragon \u2014\u2014 \u628a PHP\u3001MySQL\u3001Nginx \u585e\u8fdb\u4e00\u4e2a\u7eff\u8272\u6587\u4ef6\u5939\uff0c\u53cc\u51fb\u5c31\u80fd\u5f00\u5de5"},"content":{"rendered":"<h2>\u4e00\u53e5\u8bdd\u5b9a\u4f4d<\/h2>\n<p>Laragon \u662f Windows \u4e0a\u7684\u4fbf\u643a\u5f0f\u672c\u5730\u5f00\u53d1\u73af\u5883\uff0c\u628a Apache\/Nginx\u3001PHP\u3001MySQL\/MariaDB\u3001Redis\u3001Node.js \u8fd9\u4e9b\u96f6\u788e\u7ec4\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u7eff\u8272\u76ee\u5f55\uff0c\u70b9\u4e00\u4e0b\u56fe\u6807\u5c31\u80fd\u5f97\u5230\u4e00\u4e2a\u80fd\u8dd1\u7684 Web \u7ad9\u70b9\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u9700\u8981\u5b83<\/h2>\n<p>\u5728 Windows \u4e0a\u642d PHP \u73af\u5883\u5386\u6765\u662f\u529d\u9000\u73af\u8282\u3002XAMPP \u4f53\u79ef\u5927\u3001\u7ec4\u4ef6\u7248\u672c\u504f\u65e7\u3001\u6362 PHP \u7248\u672c\u8981\u624b\u5de5\u6539\u914d\u7f6e\uff1b\u81ea\u5df1\u88c5 Nginx \u52a0 PHP-FPM \u53c8\u8981\u5904\u7406 fastcgi \u53c2\u6570\u3001\u7aef\u53e3\u51b2\u7a81\u3001\u670d\u52a1\u6ce8\u518c\uff0c\u4e00\u4e2a\u4e0b\u5348\u5c31\u8fc7\u53bb\u4e86\u3002\u505a\u4e2a\u5c0f\u9879\u76ee\u3001\u6539\u4e2a\u4e3b\u9898\u3001\u8dd1\u4e00\u6bb5 WordPress \u63d2\u4ef6\uff0c\u5f80\u5f80\u73af\u5883\u914d\u597d\uff0c\u70ed\u60c5\u5df2\u7ecf\u6d88\u8017\u6389\u4e00\u534a\u3002<\/p>\n<p>\u53e6\u4e00\u7c7b\u9ebb\u70e6\u662f\u7248\u672c\u6f02\u79fb\uff1a\u672c\u673a\u88c5\u7684\u662f PHP 8.1\uff0c\u5ba2\u6237\u670d\u52a1\u5668\u662f 8.3\uff0c\u67d0\u4e9b\u51fd\u6570\u7684\u9ed8\u8ba4\u884c\u4e3a\u5dee\u5f02\u8981\u5230\u4e0a\u7ebf\u90a3\u5929\u624d\u66b4\u9732\u3002\u8981\u4e48\u518d\u88c5\u4e00\u53f0\u865a\u62df\u673a\uff0c\u8981\u4e48\u5f00\u59cb\u5728\u5404\u79cd php.ini \u5907\u4efd\u6587\u4ef6\u4e4b\u95f4\u731c\u8c1c\u3002<\/p>\n<h2>\u6838\u5fc3\u80fd\u529b<\/h2>\n<ul>\n<li><strong>\u4e00\u952e\u8d77\u505c<\/strong>\uff1a\u4e3b\u754c\u9762\u70b9\u300cStart All\u300d\uff0cWeb \u670d\u52a1\u5668\u3001\u6570\u636e\u5e93\u3001PHP \u4e00\u8d77\u62c9\u8d77\uff0c\u6258\u76d8\u56fe\u6807\u4f1a\u53d8\u8272\u8868\u793a\u5c31\u7eea\u3002<\/li>\n<li><strong>\u591a\u7248\u672c\u5171\u5b58<\/strong>\uff1aPHP\u3001MySQL\u3001Node\u3001Nginx \u90fd\u53ef\u4ee5\u653e\u591a\u4efd\uff0c\u53f3\u952e\u83dc\u5355\u5207\u6362\uff0c\u6539\u7684\u662f\u76ee\u5f55\u8f6f\u94fe\u800c\u4e0d\u662f\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li><strong>\u81ea\u52a8\u865a\u62df\u4e3b\u673a<\/strong>\uff1a\u5728 www \u76ee\u5f55\u4e0b\u65b0\u5efa\u6587\u4ef6\u5939\uff0c\u81ea\u52a8\u751f\u6210 <code>\u9879\u76ee\u540d.test<\/code> \u57df\u540d\u5e76\u5199\u5165 hosts\uff0c\u4e0d\u7528\u624b\u5de5\u914d vhost\u3002<\/li>\n<li><strong>\u5185\u7f6e\u5de5\u5177\u5165\u53e3<\/strong>\uff1aComposer\u3001Git\u3001npm\u3001phpMyAdmin\u3001Mailpit\uff08\u672c\u5730\u6536\u6d4b\u8bd5\u90ae\u4ef6\uff09\u3001\u5185\u7f51\u7a7f\u900f\u4e4b\u7c7b\u7684\u5e38\u7528\u4ef6\u90fd\u5728\u6258\u76d8\u83dc\u5355\u91cc\u3002<\/li>\n<li><strong>\u4fbf\u643a<\/strong>\uff1a\u6574\u4e2a\u76ee\u5f55\u80fd\u653e U \u76d8\u6216\u540c\u6b65\u76d8\uff0c\u6362\u673a\u5668\u62f7\u8d70\u5373\u53ef\uff0c\u6ce8\u518c\u8868\u51e0\u4e4e\u4e0d\u7559\u75d5\u8ff9\uff08\u670d\u52a1\u6a21\u5f0f\u9664\u5916\uff09\u3002<\/li>\n<li><strong>\u5feb\u901f\u5efa\u7ad9<\/strong>\uff1aQuick Create \u91cc\u9009 WordPress\u3001Laravel \u4e4b\u7c7b\uff0c\u81ea\u52a8\u4e0b\u8f7d\u3001\u5efa\u5e93\u3001\u5199\u597d\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h2>\u5b9e\u6d4b\u4f53\u9a8c<\/h2>\n<p>\u5728\u4e00\u53f0 16G \u5185\u5b58\u7684 Win11 \u673a\u5668\u4e0a\u8bd5\uff1a\u5b8c\u6574\u5305\u5927\u7ea6 700MB \u5230 1GB\uff08\u591a\u585e\u51e0\u4e2a PHP \u7248\u672c\u4f1a\u66f4\u5927\uff09\uff0c\u9996\u6b21\u542f\u52a8 3 \u5230 5 \u79d2\uff0c\u4e4b\u540e\u57fa\u672c\u5728 1 \u5230 2 \u79d2\u5185\u5c31\u7eea\uff0c\u6bd4 XAMPP \u90a3\u4e2a\u63a7\u5236\u9762\u677f\u987a\u624b\u4e0d\u5c11\u3002<\/p>\n<p>\u7528 Quick Create \u5efa\u4e00\u4e2a WordPress \u7ad9\u70b9\uff0c\u4ece\u70b9\u51fb\u5230\u6d4f\u89c8\u5668\u6253\u5f00\u9996\u9875\u5927\u7ea6 40 \u79d2\uff0c\u5176\u4e2d\u5927\u534a\u65f6\u95f4\u82b1\u5728\u4e0b\u8f7d\u5b89\u88c5\u5305\u4e0a\u3002\u5207 PHP \u7248\u672c\u53ea\u8981\u5728\u83dc\u5355\u91cc\u9009\u4e00\u4e0b\uff0c\u91cd\u542f\u670d\u52a1\u540e phpinfo \u7acb\u523b\u8ddf\u7740\u53d8\uff1b8.1 \u548c 8.3 \u6765\u56de\u5207\u4e86\u51e0\u6b21\uff0c\u6ca1\u6709\u51fa\u73b0\u6269\u5c55\u52a0\u8f7d\u5931\u8d25\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u7248\u672c\u76ee\u5f55\u4e0b\u7684 php.ini \u662f\u5404\u81ea\u72ec\u7acb\u7684\u3002<\/p>\n<p>\u6570\u636e\u5e93\u9ed8\u8ba4 MariaDB\u3001\u7aef\u53e3 3306\u3002\u5982\u679c\u672c\u673a\u5df2\u7ecf\u6709 MySQL \u670d\u52a1\u5360\u7740\uff0cLaragon \u4f1a\u63d0\u793a\u51b2\u7a81\uff0c\u6539\u6210 3307 \u518d\u540c\u6b65\u6539\u9879\u76ee\u914d\u7f6e\u5c31\u884c\u3002\u8d44\u6e90\u5360\u7528\u65b9\u9762\uff0c\u7a7a\u8f7d\u65f6 Web \u670d\u52a1\u52a0\u6570\u636e\u5e93\u5408\u8ba1\u7ea6 120 \u5230 180MB \u5185\u5b58\uff0c\u6bd4 Docker Desktop \u90a3\u5957\uff08\u865a\u62df\u673a\u5e38\u9a7b 1GB \u4ee5\u4e0a\uff09\u8f7b\u5f97\u591a\uff0c\u8001\u7b14\u8bb0\u672c\u4e0a\u4e5f\u8dd1\u5f97\u52a8\u3002<\/p>\n<h2>\u9002\u5408\u8c01<\/h2>\n<ul>\n<li>\u7528 Windows \u505a PHP \/ WordPress \u5f00\u53d1\u3001\u53c8\u4e0d\u60f3\u78b0 Docker \u7684\u4eba<\/li>\n<li>\u9700\u8981\u5728\u672c\u673a\u540c\u65f6\u7ef4\u62a4\u591a\u4e2a PHP \u7248\u672c\u3001\u591a\u4e2a\u7ad9\u70b9\u7684\u5c0f\u56e2\u961f<\/li>\n<li>\u7ed9\u65b0\u624b\u505a\u6559\u5b66\u6f14\u793a\uff0c\u73af\u5883\u4e00\u6b21\u914d\u597d\u53ef\u4ee5\u6574\u5305\u5206\u53d1<\/li>\n<\/ul>\n<h2>\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9<\/h2>\n<ul>\n<li>\u9ed8\u8ba4\u662f\u4fbf\u643a\u6a21\u5f0f\uff0c\u670d\u52a1\u4e0d\u6ce8\u518c\u4e3a\u7cfb\u7edf\u670d\u52a1\uff0c\u5f00\u673a\u4e0d\u4f1a\u81ea\u52a8\u542f\u52a8\uff1b\u8981\u5f00\u673a\u81ea\u542f\u5f97\u5207\u5230\u670d\u52a1\u6a21\u5f0f\uff0c\u90a3\u65f6\u624d\u4f1a\u5199\u6ce8\u518c\u8868\u3002<\/li>\n<li>\u81ea\u52a8\u751f\u6210\u7684 <code>.test<\/code> \u57df\u540d\u4f9d\u8d56 hosts \u6587\u4ef6\u3002\u88c5\u4e86\u4f1a\u6539\u5199 hosts \u7684\u5b89\u5168\u8f6f\u4ef6\uff0c\u57df\u540d\u89e3\u6790\u53ef\u80fd\u76f4\u63a5\u5931\u6548\u3002<\/li>\n<li>\u53ea\u9762\u5411 Windows\uff0c\u8de8\u5e73\u53f0\u9700\u6c42\u8fd8\u662f\u5f97\u770b Docker \u6216 Devbox \u4e00\u7c7b\u65b9\u6848\u3002<\/li>\n<li>\u4e0d\u8981\u7167\u642c\u5230\u751f\u4ea7\u73af\u5883\uff1a\u9ed8\u8ba4\u914d\u7f6e\u4e3a\u4e86\u5f00\u53d1\u65b9\u4fbf\u6253\u5f00\u4e86\u4e0d\u5c11\u8c03\u8bd5\u9879\uff0c\u7f3a\u5b89\u5168\u52a0\u56fa\u3002<\/li>\n<li>\u9879\u76ee\u653e\u5728\u4e2d\u6587\u8def\u5f84\u6216\u5e26\u7a7a\u683c\u7684\u8def\u5f84\u4e0b\uff0c\u4e2a\u522b\u8001\u7248\u672c PHP \u6269\u5c55\u4f1a\u62a5\u9519\uff0c\u5efa\u8bae\u8def\u5f84\u4fdd\u6301\u7eaf\u82f1\u6587\u3002<\/li>\n<\/ul>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>Laragon \u7684\u4ef7\u503c\u4e0d\u5728\u4e8e\u529f\u80fd\u591a\uff0c\u800c\u5728\u4e8e\u628a\u300c\u914d\u7f6e\u300d\u8fd9\u4ef6\u82e6\u529b\u6d3b\u538b\u7f29\u6210\u4e00\u6b21\u70b9\u51fb\u3002\u5982\u679c\u4f60\u53ea\u662f\u60f3\u5728 Windows \u4e0a\u5b89\u9759\u8dd1\u4e00\u4e2a PHP \u7ad9\u70b9\uff0c\u5b83\u6bd4 XAMPP \u5e72\u51c0\u3001\u6bd4 Docker \u8f7b\u3001\u6bd4\u624b\u5de5\u642d\u5efa\u7701\u5fc3\uff1b\u5982\u679c\u4f60\u5df2\u7ecf\u5728 Docker \u6d41\u6c34\u7ebf\u91cc\uff0c\u5c31\u6ca1\u5fc5\u8981\u518d\u53e0\u4e00\u5c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laragon \u662f Windows \u4e0a\u7684\u4fbf\u643a\u5f0f\u672c\u5730\u5f00\u53d1\u73af\u5883\uff0c\u628a Apache\/Nginx\u3001PHP\u3001MySQL\/MariaDB\u3001Redis\u3001Node.js \u8fd9\u4e9b\u96f6\u788e\u7ec4\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u7eff\u8272\u76ee\u5f55\uff0c\u70b9\u4e00\u4e0b\u56fe\u6807\u5c31\u80fd\u5f97\u5230\u4e00\u4e2a\u80fd\u8dd1\u7684 Web \u7ad9\u70b9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"http:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293"}],"version-history":[{"count":0,"href":"http:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"http:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}