{"id":17559,"date":"2024-10-05T12:07:32","date_gmt":"2024-10-05T03:07:32","guid":{"rendered":"https:\/\/takuminasuno.com\/?p=17559"},"modified":"2024-10-05T12:23:29","modified_gmt":"2024-10-05T03:23:29","slug":"20241005_wordpress-dev_ja","status":"publish","type":"post","link":"https:\/\/takuminasuno.com\/ja\/20241005_wordpress-dev_ja","title":{"rendered":"ConoHa VPS\u306eWordPress\u30b5\u30a4\u30c8\u3092\u8907\u88fd\u3057\u3066\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u74b0\u5883\u3092\u4f5c\u3063\u305f\u624b\u9806\u3092\u307e\u3068\u3081\u3066\u307f\u305f"},"content":{"rendered":"<p>&#12371;&#12435;&#12395;&#12385;&#12399;&#12290;<a href=\"https:\/\/x.com\/takumi_nasuno\" target=\"_blank\" rel=\"noopener noreferrer\">&#37027;&#38920;&#37326;&#25299;&#23455;<\/a>&#12391;&#12377;&#12290;<p>&#20170;&#26085;&#12399;ConoHa VPS&#12398;WordPress&#12469;&#12452;&#12488;&#12434;&#35079;&#35069;&#12375;&#12390;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#65288;STG&#29872;&#22659;&#65289;&#12434;&#20316;&#12387;&#12383;&#25163;&#38918;&#12395;&#12388;&#12356;&#12390;&#12289;&#20633;&#24536;&#37682;&#12434;&#20860;&#12397;&#12390;&#12414;&#12392;&#12417;&#12390;&#12362;&#12365;&#12383;&#12356;&#12392;&#24605;&#12356;&#12414;&#12377;&#12290;<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_68_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u76ee\u6b21<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/takuminasuno.com\/ja\/20241005_wordpress-dev_ja\/#WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%A8%E3%81%AF%EF%BC%9F\" title=\"WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12392;&#12399;&#65311;\">WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12392;&#12399;&#65311;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/takuminasuno.com\/ja\/20241005_wordpress-dev_ja\/#WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%AE%E6%A7%8B%E6%88%90\" title=\"WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#27083;&#25104;\">WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#27083;&#25104;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/takuminasuno.com\/ja\/20241005_wordpress-dev_ja\/#WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%AE%E4%BD%9C%E6%88%90%E6%89%8B%E9%A0%86\" title=\"WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#20316;&#25104;&#25163;&#38918;\">WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#20316;&#25104;&#25163;&#38918;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/takuminasuno.com\/ja\/20241005_wordpress-dev_ja\/#%E3%81%BE%E3%81%A8%E3%82%81\" title=\"&#12414;&#12392;&#12417;\">&#12414;&#12392;&#12417;<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%A8%E3%81%AF%EF%BC%9F\"><\/span>WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12392;&#12399;&#65311;<span class=\"ez-toc-section-end\"><\/span><\/h3><p>WordPress&#12399;&#31777;&#21336;&#12395;&#12502;&#12525;&#12464;&#12420;&#12513;&#12487;&#12451;&#12450;&#12434;&#27083;&#31689;&#12391;&#12365;&#12427;OSS&#65288;&#12458;&#12540;&#12503;&#12531;&#12477;&#12540;&#12473;&#65289;&#12398;CMS&#65288;&#12467;&#12531;&#12486;&#12531;&#12484;&#12510;&#12493;&#12472;&#12513;&#12531;&#12488;&#12471;&#12473;&#12486;&#12512;&#65289;&#12391;&#12289;&#12469;&#12540;&#12496;&#12540;&#12434;&#25345;&#12387;&#12390;&#12356;&#12427;&#20154;&#12391;&#12354;&#12428;&#12400;&#12384;&#12428;&#12391;&#12418;&#28961;&#26009;&#12391;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12375;&#12390;&#12454;&#12455;&#12502;&#12469;&#12452;&#12488;&#12434;&#31435;&#12385;&#19978;&#12370;&#12425;&#12428;&#12414;&#12377;&#12290;<\/p><p>&#27096;&#12293;&#12394;&#12487;&#12470;&#12452;&#12531;&#12398;WordPress&#12486;&#12540;&#12510;&#12364;&#20844;&#38283;&#12373;&#12428;&#12390;&#12362;&#12426;&#12289;&#12503;&#12525;&#12464;&#12521;&#12511;&#12531;&#12464;&#12379;&#12378;&#12392;&#12418;&#12494;&#12540;&#12467;&#12540;&#12489;&#12391;&#12469;&#12452;&#12488;&#12434;&#36939;&#21942;&#12377;&#12427;&#12371;&#12392;&#12364;&#21487;&#33021;&#12391;&#12377;&#12290;&#12414;&#12383;&#12289;&#12469;&#12540;&#12496;&#12540;&#31649;&#29702;&#12399;&#12391;&#12365;&#12394;&#12356;&#12424;&#12392;&#12356;&#12358;&#26041;&#21521;&#12369;&#12395;&#26377;&#20767;&#12391;&#12501;&#12523;&#12510;&#12493;&#12540;&#12472;&#12489;&#29872;&#22659;&#12434;&#25552;&#20379;&#12375;&#12390;&#12356;&#12427;&#20225;&#26989;&#12418;&#12354;&#12426;&#12414;&#12377;&#12290;Automattic&#31038;&#12398;WordPress.com&#12364;&#19968;&#30058;&#26377;&#21517;&#12395;&#24605;&#12356;&#12414;&#12377;&#12290;<\/p><p>&#19968;&#26041;&#12391;WordPress&#12398;1&#12388;&#12398;&#29305;&#24500;&#12395;&#12289;&#12458;&#12522;&#12472;&#12490;&#12523;&#12398;&#12486;&#12540;&#12510;&#12434;&#20316;&#25104;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12427;&#28857;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;PHP&#12392;CSS, JavaScript&#12394;&#12393;&#12391;&#35352;&#36848;&#12377;&#12427;&#12371;&#12392;&#12391;&#33258;&#20998;&#12384;&#12369;&#12398;&#12454;&#12455;&#12502;&#12469;&#12452;&#12488;&#12398;&#27083;&#25104;&#12539;&#12487;&#12470;&#12452;&#12531;&#12434;&#20316;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12427;&#12398;&#12391;&#12377;&#12290;<\/p><p>&#12375;&#12363;&#12375;&#12289;&#12458;&#12522;&#12472;&#12490;&#12523;&#12398;&#12486;&#12540;&#12510;&#20316;&#25104;&#12392;&#12399;&#12289;&#12381;&#12428;&#12377;&#12394;&#12431;&#12385;&#12503;&#12525;&#12464;&#12521;&#12511;&#12531;&#12464;&#12434;&#12377;&#12427;&#12392;&#12356;&#12358;&#12371;&#12392;&#12391;&#12377;&#12290;&#26360;&#12356;&#12383;&#12467;&#12540;&#12489;&#12395;&#12496;&#12464;&#12364;&#12354;&#12427;&#12414;&#12414;&#12469;&#12452;&#12488;&#12395;&#21453;&#26144;&#12377;&#12427;&#12392;&#12289;&#12358;&#12387;&#12363;&#12426;&#12469;&#12452;&#12488;&#12364;&#34920;&#31034;&#12373;&#12428;&#12394;&#12367;&#12394;&#12427;&#12371;&#12392;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;<\/p><p><a href=\"https:\/\/takuminasuno.com\/wp-content\/uploads\/2024\/10\/wordpress-fatal-error.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17572\" src=\"https:\/\/takuminasuno.com\/wp-content\/uploads\/2024\/10\/wordpress-fatal-error.png\" alt=\"There has been a critical error on your websites. Please check your site admin email inbox for instructions.\" width=\"900\" height=\"276\"><\/a><\/p><p>&#12392;&#12356;&#12387;&#12383;&#12456;&#12521;&#12540;&#30011;&#38754;&#12392;&#12392;&#12418;&#12395;&#12289;&#12469;&#12452;&#12488;&#12364;&#35211;&#12425;&#12428;&#12394;&#12367;&#12394;&#12427;&#20107;&#24907;&#12395;&#36973;&#36935;&#12375;&#12383;&#12371;&#12392;&#12364;&#12354;&#12427;&#26041;&#12399;&#23569;&#12394;&#12367;&#12394;&#12356;&#12391;&#12375;&#12423;&#12358;&#12290;&#33258;&#20998;&#12364;&#26360;&#12356;&#12383;&#12486;&#12540;&#12510;&#12364;&#12385;&#12419;&#12435;&#12392;&#21205;&#12367;&#12363;&#12393;&#12358;&#12363;&#12434;&#30906;&#12363;&#12417;&#12427;&#12383;&#12417;&#12395;&#12399;&#12289;&#38283;&#30330;&#29872;&#22659;&#12434;XAMPP&#12420;Local&#12392;&#12356;&#12387;&#12383;&#12484;&#12540;&#12523;&#12434;&#20351;&#12387;&#12390;&#12525;&#12540;&#12459;&#12523;&#29872;&#22659;&#12395;&#27083;&#31689;&#12377;&#12427;&#12398;&#12364;&#19968;&#33324;&#30340;&#12391;&#12377;&#12290;<\/p><p>&#12375;&#12363;&#12375;&#12289;&#12525;&#12540;&#12459;&#12523;&#12398;&#38283;&#30330;&#29872;&#22659;&#12384;&#12392;&#23436;&#20840;&#12395;&#29872;&#22659;&#12434;&#19968;&#33268;&#12373;&#12379;&#12427;&#12371;&#12392;&#12364;&#38627;&#12375;&#12356;&#12383;&#12417;&#12289;&#12471;&#12531;&#12503;&#12523;&#12395;&#26412;&#30058;&#29872;&#22659;&#12392;&#21516;&#12376;&#29872;&#22659;&#65288;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#65289;&#12434;&#12469;&#12540;&#12496;&#12540;&#19978;&#12395;&#27083;&#31689;&#12377;&#12427;&#12371;&#12392;&#12364;&#26377;&#21177;&#12391;&#12377;&#12290;<\/p><p>&#29305;&#12395;&#12289;&#29305;&#23450;&#12398;&#25237;&#31295;&#12420;&#22266;&#23450;&#12506;&#12540;&#12472;&#23554;&#29992;&#12398;&#12486;&#12540;&#12510;&#12434;&#29992;&#24847;&#12375;&#12390;&#12356;&#12427;&#22580;&#21512;&#12399;&#12289;&#25237;&#31295;ID&#12391;&#25351;&#23450;&#12377;&#12427;&#20860;&#12397;&#21512;&#12356;&#12391;&#12487;&#12540;&#12479;&#12434;&#23436;&#20840;&#12395;&#21516;&#26399;&#12377;&#12427;&#24517;&#35201;&#12364;&#20986;&#12390;&#12365;&#12414;&#12377;&#12290;&#12381;&#12358;&#12356;&#12387;&#12383;&#22580;&#21512;&#12399;XAMPP&#12420;Local&#12391;&#20316;&#12387;&#12383;&#29872;&#22659;&#12391;&#19968;&#33268;&#12373;&#12379;&#12427;&#12398;&#12364;&#20740;&#21163;&#12394;&#12398;&#12391;&#12289;&#12469;&#12540;&#12496;&#12540;&#19978;&#12395;&#29872;&#22659;&#12434;&#35079;&#35069;&#12377;&#12427;&#26041;&#12364;&#27005;&#12384;&#12387;&#12383;&#12426;&#12375;&#12414;&#12377;&#12290;<\/p><p>&#12392;&#12356;&#12358;&#12371;&#12392;&#12391;&#12289;&#35504;&#12418;&#12364;&#35211;&#12425;&#12428;&#12427;WordPress&#12398;&#26412;&#30058;&#29872;&#22659;&#12392;&#12399;&#21029;&#12395;&#12289;WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12434;&#20316;&#12426;&#12414;&#12375;&#12423;&#12358;&#12392;&#12356;&#12358;&#12398;&#12364;&#26412;&#35352;&#20107;&#12398;&#20027;&#38988;&#12391;&#12377;&#12290;<\/p><p>&nbsp;<\/p><h3><span class=\"ez-toc-section\" id=\"WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%AE%E6%A7%8B%E6%88%90\"><\/span>WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#27083;&#25104;<span class=\"ez-toc-section-end\"><\/span><\/h3><p>&#23455;&#38555;&#12398;&#25163;&#38918;&#12395;&#20837;&#12427;&#21069;&#12395;&#12289;WordPress&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12392;&#12399;&#20855;&#20307;&#30340;&#12395;&#12393;&#12358;&#12356;&#12358;&#12371;&#12392;&#12363;&#12289;&#27083;&#25104;&#12434;&#12414;&#12392;&#12417;&#12390;&#12415;&#12414;&#12377;&#12290;<\/p><p><a href=\"https:\/\/takuminasuno.com\/wp-content\/uploads\/2024\/10\/wordpress-stg-1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17577\" src=\"https:\/\/takuminasuno.com\/wp-content\/uploads\/2024\/10\/wordpress-stg-1.png\" alt=\"\" width=\"1600\" height=\"755\"><\/a><\/p><p>DNS&#12469;&#12540;&#12496;&#12540;&#20596;&#12391;A&#12524;&#12467;&#12540;&#12489;&#12434;&#36861;&#21152;&#12375;&#12388;&#12388;&#12289;&#12418;&#12392;&#12418;&#12392;&#20316;&#12387;&#12390;&#12356;&#12383;&#12467;&#12531;&#12486;&#12531;&#12484;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12392;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#35079;&#35069;&#12375;&#12289;&#35373;&#23450;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12398;conf&#12501;&#12449;&#12452;&#12523;&#12391;&#12496;&#12540;&#12481;&#12515;&#12523;&#12507;&#12473;&#12488;&#12398;&#35373;&#23450;&#12434;&#36861;&#21152;&#12377;&#12427;&#12452;&#12513;&#12540;&#12472;&#12391;&#12377;&#12290;&#12383;&#12384;&#12289;&#12381;&#12428;&#12382;&#12428;&#35079;&#35069;&#12375;&#12383;&#12418;&#12398;&#12434;&#20462;&#27491;&#12375;&#12394;&#12356;&#12392;&#12356;&#12369;&#12394;&#12356;&#31623;&#25152;&#12364;&#12354;&#12427;&#12398;&#12391;&#12289;&#12381;&#12428;&#12399;&#20855;&#20307;&#30340;&#12394;&#25163;&#38918;&#12391;&#30906;&#35469;&#12375;&#12383;&#12356;&#12392;&#24605;&#12356;&#12414;&#12377;&#12290;<\/p><p>&nbsp;<\/p><h3><span class=\"ez-toc-section\" id=\"WordPress%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B8%E3%83%B3%E3%82%B0%E7%92%B0%E5%A2%83%E3%81%AE%E4%BD%9C%E6%88%90%E6%89%8B%E9%A0%86\"><\/span>WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#20316;&#25104;&#25163;&#38918;<span class=\"ez-toc-section-end\"><\/span><\/h3><p>&#12381;&#12428;&#12391;&#12399;&#12289;WordPress&#12469;&#12452;&#12488;&#12434;&#35079;&#35069;&#12375;&#12390;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12434;&#20316;&#12387;&#12383;&#25163;&#38918;&#12434;&#35211;&#12390;&#12356;&#12365;&#12383;&#12356;&#12392;&#12362;&#12415;&#12414;&#12377;&#12290;<\/p><blockquote><p>&#12394;&#12362;&#12289;&#20316;&#26989;&#29872;&#22659;&#12399;&#20197;&#19979;&#12398;&#36890;&#12426;&#12391;&#12377;&#12290;&#12372;&#30041;&#24847;&#12367;&#12384;&#12373;&#12356;&#12290;<\/p>\n<ul>\n<li>&#12469;&#12540;&#12496;&#12540;&#65306;ConoHa VPS<\/li>\n<li>&#12469;&#12540;&#12496;&#12540;OS&#65306;Rocky Linux 9.4&#65288;&#8251;CentOS&#12392;&#21516;&#31995;&#21015;&#65289;<\/li>\n<li>Web&#12469;&#12540;&#12496;&#12540;&#65306;Apache&#65288;certbot&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#28168;&#65289;<\/li>\n<li>PC&#65306;Windows 11<\/li>\n<li>SSH&#12463;&#12521;&#12452;&#12450;&#12531;&#12488;&#65306;Windows PowerShell<\/li>\n<\/ul>\n<\/blockquote><p>&#12381;&#12428;&#12391;&#12399;&#20855;&#20307;&#30340;&#12395;&#35211;&#12390;&#12356;&#12365;&#12414;&#12375;&#12423;&#12358;&#12290;<\/p><ol>\n<li>&#12469;&#12540;&#12496;&#12540;&#12395;SSH&#12525;&#12464;&#12452;&#12531;<\/li>\n<li>MariaDB&#12395;&#12525;&#12464;&#12452;&#12531;&#12375;&#12390;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12434;&#20316;&#25104;\n<pre class=\"lang:default decode:true\">CREATE DATABASE {my-db}_stg_db;\r\nCREATE USER '{database-user}'@'localhost' IDENTIFIED BY 'secure_password';\r\nGRANT ALL PRIVILEGES ON {my-db}_stg_db.* TO '{database-user}'@'localhost';\r\nFLUSH PRIVILEGES;\r\n<\/pre>\n<\/li>\n<li>&#26412;&#30058;&#29872;&#22659;&#12398;&#12487;&#12540;&#12479;&#12505;&#12540;&#12473;&#12398;dump&#12434;&#21462;&#12387;&#12390;&#12289;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#26041;&#12395;&#27969;&#12375;&#36796;&#12416;\n<pre class=\"lang:default decode:true\">mysqldump -u root -p {my-db}_db &gt; \/tmp\/{my-db}_db.sql\r\nmysql {my-db}_stg_db &lt; \/tmp\/{my-db}_db.sql -u root -p<\/pre>\n<\/li>\n<li>&#12467;&#12531;&#12486;&#12531;&#12484;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12398;&#35079;&#35069;\n<pre class=\"lang:default decode:true\">cp -r \/var\/www\/html\/{my-app}.com \/var\/www\/html\/stg.{my-app}.com<\/pre>\n<\/li>\n<li>wp-config.php&#12398;&#20462;&#27491;\n<pre class=\"lang:default decode:true\">vim \/var\/www\/html\/stg.{my-app}.com\/wp-config.php<\/pre>\n<p style=\"text-align: center;\">&darr;&#23455;&#38555;&#12398;&#35352;&#36848;&#20869;&#23481;&darr;<br>\n(5&#28857;&#12434;&#20462;&#27491;)<\/p>\n<pre class=\"lang:default decode:true\">define('DB_NAME', '{my-db}_stg_db');\r\ndefine('DB_USER', '{database-user}');\r\ndefine('DB_PASSWORD', '{secure-password}')\r\ndefine('WP_HOME', 'https:\/\/stg.{my-app}.com');\r\ndefine('WP_SITEURL','https:\/\/stg.{my-app}.com');\r\n<\/pre>\n<\/li>\n<li>robots.txt&#12434;&#35373;&#32622;&#12375;&#12390;Google&#12398;&#12469;&#12452;&#12488;&#24033;&#22238;&#12434;&#12502;&#12525;&#12483;&#12463;&#12290;<br>\n&#8251;&#12418;&#12387;&#12392;&#12475;&#12461;&#12517;&#12450;&#12395;&#12375;&#12383;&#12356;&#22580;&#21512;&#12399;&#12289;Apache&#35373;&#23450;&#12501;&#12449;&#12452;&#12523;&#65288;wp-config.php&#65289;&#12395;&#12390;Basic&#35469;&#35388;&#12434;&#35373;&#23450;&#12375;&#12383;&#12426;&#12394;&#12393;&#12434;&#12377;&#12427;&#12290;\n<pre class=\"lang:default decode:true\">vim \/var\/www\/html\/stg.{my-app}.com\/robots.txt<\/pre>\n<p style=\"text-align: center;\">&darr;&#23455;&#38555;&#12398;&#35352;&#36848;&#20869;&#23481;&darr;<\/p>\n<pre class=\"lang:default decode:true\">User-agent: *\r\nDisallow: \/<\/pre>\n<\/li>\n<li>&#12486;&#12540;&#12510;&#12501;&#12449;&#12452;&#12523;&#12434;WinSCP&#12363;&#12425;&#20316;&#26989;&#12518;&#12540;&#12470;&#12540;&#12391;&#26356;&#26032;&#12391;&#12365;&#12427;&#12424;&#12358;&#12395;&#27177;&#38480;&#35373;&#23450;<br>\n&#8251;apache&#12364;&#31649;&#29702;&#32773;&#12398;&#12486;&#12540;&#12510;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12434;&#20316;&#26989;&#12518;&#12540;&#12470;&#12540;&#12418;&#32232;&#38598;&#12391;&#12365;&#12427;&#12424;&#12358;&#12395;&#12377;&#12427;&#12290;\n<pre class=\"lang:default decode:true\">sudo groupadd wpeditors\r\nsudo usermod -a -G wpeditors {&#20316;&#26989;&#12518;&#12540;&#12470;&#12540;}\r\nsudo usermod -a -G wpeditors apache\r\nsudo chown -R apache:wpeditors \/var\/www\/html\/stg.{my-app}.com\/wp-content\/themes\r\nsudo find \/var\/www\/html\/stg.{my-app}.com\/wp-content\/themes -type d -exec chmod 775 {} \\;\r\nsudo find \/var\/www\/html\/stg.{my-app}.com\/wp-content\/themes -type f -exec chmod 664 {} \\;\r\nsudo find \/var\/www\/html\/stg.{my-app}.com\/wp-content\/themes -type d -exec chmod g+s {} \\;\r\n<\/pre>\n<\/li>\n<li>&#12489;&#12513;&#12452;&#12531;&#12398;DNS&#12524;&#12467;&#12540;&#12489;&#12398;&#35373;&#23450;<br>\n&#8251;A&#12524;&#12467;&#12540;&#12489;&#12434;&#12469;&#12540;&#12496;&#12540;&#12398;IP&#12450;&#12489;&#12524;&#12473;&#12395;&#21521;&#12369;&#12427;&#24418;&#12391;&#35373;&#23450;&#12375;&#12289;&#12467;&#12510;&#12531;&#12489;&#12503;&#12525;&#12531;&#12503;&#12488;&#12391;&#12300;nslookup stg.{my-app}.com&#12301;&#12434;&#23455;&#34892;&#12375;&#12390;IP&#12450;&#12489;&#12524;&#12473;&#12364;&#34920;&#31034;&#12373;&#12428;&#12427;&#12363;&#30906;&#35469;&#12377;&#12427;&#12290;<\/li>\n<li>SSL&#35388;&#26126;&#26360;&#12398;&#30330;&#34892;\n<pre class=\"lang:default decode:true\">sudo certbot certonly --apache -d stg.{my-app}.com\r\nsudo certbot renew --dry-run<\/pre>\n<\/li>\n<li>&#12496;&#12540;&#12481;&#12515;&#12523;&#12507;&#12473;&#12488;&#12398;&#35373;&#23450;<br>\n&#8251;&#12475;&#12461;&#12517;&#12522;&#12486;&#12451;&#12395;&#38306;&#36899;&#12377;&#12427;&#12398;&#12391;&#35443;&#32048;&#12399;&#26360;&#12363;&#12394;&#12356;&#12364;&#12289;&#12418;&#12392;&#12398;conf&#12501;&#12449;&#12452;&#12523;&#12434;&#35079;&#35069;&#12398;&#12358;&#12360;&#12289;&#12377;&#12409;&#12390;&#12398;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12289;URL&#12434;&#26412;&#30058;&#29872;&#22659;&#65288;{my-app}&#65289;&#12398;&#12418;&#12398;&#12363;&#12425;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12398;&#12418;&#12398;&#65288;stg.{my-app}&#65289;&#12395;&#32622;&#12365;&#25563;&#12360;&#12427;&#12290;\n<pre class=\"lang:default decode:true\">cp \/etc\/httpd\/conf.d\/{my-app}.com.conf \/etc\/httpd\/conf.d\/stg.{my-app}.com.conf\r\nvim \/etc\/httpd\/conf.d\/stg.{my-app}.com.conf\r\nsudo apachectl configtest\r\nsudo systemctl restart httpd\r\n<\/pre>\n<\/li>\n<li>&#31649;&#29702;&#30011;&#38754;&#12395;&#12450;&#12463;&#12475;&#12473;&#12375;&#12289;WordPress&#12398;&#31649;&#29702;&#30011;&#38754;&#12391;&#12418;&#12300;&#35373;&#23450;&#12301;&rarr;&#12300;&#34920;&#31034;&#35373;&#23450;&#12301;&#12395;&#31227;&#21205;&#12375;&#12390;&#12300;&#26908;&#32034;&#12456;&#12531;&#12472;&#12531;&#12391;&#12398;&#34920;&#31034;&#12301;&#12398;&#12481;&#12455;&#12483;&#12463;&#12508;&#12483;&#12463;&#12473;&#12434;&#22806;&#12377;&#12290;<\/li>\n<\/ol><p>&#12371;&#12428;&#12391;&#35373;&#23450;&#23436;&#20102;&#12391;&#12377;&#12290;&#12418;&#12358;&#23569;&#12375;&#21427;&#23494;&#12395;&#12420;&#12426;&#12383;&#12356;&#22580;&#21512;&#12399;&#12289;Better Search Replace&#12394;&#12393;&#12398;&#12503;&#12521;&#12464;&#12452;&#12531;&#12434;&#20351;&#12387;&#12390;wp_posts&#20869;&#12398;&#26412;&#30058;&#12489;&#12513;&#12452;&#12531;&#65288;{my-app}.com&#65289;&#12434;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#12489;&#12513;&#12452;&#12531;&#65288;stg.{my-app}.com&#65289;&#12395;&#32622;&#25563;&#12377;&#12427;&#12392;&#21336;&#19968;&#29872;&#22659;&#12392;&#12375;&#12390;&#25972;&#21512;&#24615;&#12364;&#12424;&#12426;&#32186;&#40599;&#12395;&#12394;&#12426;&#12414;&#12377;&#12290;<\/p><p>&#12414;&#12383;&#12289;&#12362;&#12414;&#12369;&#12391;&#23550;&#24540;&#12375;&#12383;&#26041;&#12364;&#33391;&#12356;&#12371;&#12392;&#12392;&#12375;&#12390;&#12289;GA4&#12434;&#22987;&#12417;&#12392;&#12375;&#12383;&#12450;&#12490;&#12522;&#12486;&#12451;&#12463;&#12473;&#12484;&#12540;&#12523;&#12420;&#12510;&#12540;&#12465;&#12486;&#12451;&#12531;&#12464;&#12484;&#12540;&#12523;&#12434;&#20351;&#12387;&#12390;&#12356;&#12427;&#22580;&#21512;&#12399;&#12289;&#26412;&#30058;&#29872;&#22659;&#12398;&#26178;&#12398;&#12415;&#12484;&#12540;&#12523;&#12398;&#12479;&#12464;&#65288;Google&#12479;&#12464;&#12510;&#12493;&#12540;&#12472;&#12515;&#12540;&#12394;&#12393;&#65289;&#12364;&#25407;&#20837;&#12373;&#12428;&#12427;&#12424;&#12358;&#12395;&#12375;&#12383;&#26041;&#12364;&#33391;&#12356;&#12391;&#12377;&#12290;<\/p><p>Google&#12479;&#12464;&#12510;&#12493;&#12540;&#12472;&#12515;&#12540;&#12434;&#32076;&#30001;&#12375;&#12390;&#12484;&#12540;&#12523;&#12398;&#12479;&#12464;&#12434;&#22475;&#12417;&#36796;&#12435;&#12391;&#12356;&#12427;&#12398;&#12391;&#12354;&#12428;&#12400;&#12289;&#20197;&#19979;&#12398;&#12424;&#12358;&#12394;&#12467;&#12540;&#12489;&#12391;&#23550;&#24540;&#21487;&#33021;&#12391;&#12377;&#12290;&#12371;&#12358;&#12356;&#12387;&#12383;&#20966;&#29702;&#12434;&#20837;&#12428;&#12427;&#12384;&#12369;&#12391;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12391;&#12399;&#35501;&#12415;&#36796;&#12414;&#12428;&#12394;&#12367;&#12394;&#12426;&#12289;&#26412;&#30058;&#29872;&#22659;&#12398;&#25968;&#23383;&#12398;&#19968;&#36011;&#24615;&#12364;&#25285;&#20445;&#12373;&#12428;&#12427;&#12424;&#12358;&#12395;&#12394;&#12426;&#12414;&#12377;&#12290;<\/p><pre class=\"lang:default decode:true \">&lt;?php\r\n    $host = $_SERVER['HTTP_HOST'];\r\n    if ($host === '{my-app}.com'):\r\n?&gt;\r\n        &lt;!-- Google Tag Manager --&gt;\r\n        {&#20855;&#20307;&#30340;&#12394;&#12479;&#12464;&#12399;&#30465;&#30053;}\r\n        &lt;!-- End Google Tag Manager --&gt;\r\n&lt;?php\r\n    endif;\r\n?&gt;<\/pre><p>&nbsp;<\/p><h3><span class=\"ez-toc-section\" id=\"%E3%81%BE%E3%81%A8%E3%82%81\"><\/span>&#12414;&#12392;&#12417;<span class=\"ez-toc-section-end\"><\/span><\/h3><p>&#20316;&#26989;&#33258;&#20307;&#12399;&#30701;&#12356;&#12391;&#12377;&#12364;&#12289;&#33394;&#12293;&#12394;&#12392;&#12371;&#12429;&#12434;&#35302;&#12425;&#12394;&#12356;&#12392;&#12356;&#12369;&#12394;&#12356;&#12398;&#12391;&#12385;&#12423;&#12387;&#12392;&#22823;&#22793;&#12391;&#12377;&#12397;&#12290;&#12391;&#12418;&#12371;&#12398;&#25163;&#38918;&#12395;&#24467;&#12360;&#12400;&#12289;DNS&#12524;&#12467;&#12540;&#12489;&#12398;&#20253;&#25773;&#12434;&#24453;&#12385;&#26178;&#38291;&#12434;&#21547;&#12417;&#12390;&#12418;&#38918;&#35519;&#12395;&#12356;&#12369;&#12400;1&#26178;&#38291;&#21069;&#24460;&#12391;&#12469;&#12463;&#12483;&#12392;WordPress&#12398;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12364;&#27083;&#31689;&#12391;&#12365;&#12427;&#12398;&#12391;&#20415;&#21033;&#12391;&#12377;&#12290;<\/p><p>&#20170;&#22238;&#12399;&#12473;&#12486;&#12540;&#12472;&#12531;&#12464;&#29872;&#22659;&#12395;&#29305;&#21270;&#12375;&#12390;&#12414;&#12392;&#12417;&#12414;&#12375;&#12383;&#12364;&#12289;&#21516;&#12376;&#25163;&#38918;&#12391;&#12469;&#12452;&#12488;&#12398;&#35079;&#35069;&#12364;&#21487;&#33021;&#12394;&#12398;&#12391;&#12289;&#12371;&#12398;&#25163;&#38918;&#33258;&#20307;&#12399;&#33394;&#12293;&#12392;&#26377;&#21177;&#27963;&#29992;&#12391;&#12365;&#12381;&#12358;&#12391;&#12377;&#12290;<\/p><p>&#20197;&#19978;&#12289;&#12371;&#12398;&#25237;&#31295;&#12364;&#35504;&#12363;&#12398;&#24441;&#12395;&#31435;&#12390;&#12400;&#24184;&#12356;&#12391;&#12377;&#12290;<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#12371;&#12435;&#12395;&#12385;&#12399;&#12290;&#37027;&#38920;&#37326;&#25299;&#23455;&#12391;&#12377;&#1229 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17577,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[252],"tags":[],"class_list":["post-17559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business_ja"],"_links":{"self":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/17559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/comments?post=17559"}],"version-history":[{"count":13,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/17559\/revisions"}],"predecessor-version":[{"id":17584,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/17559\/revisions\/17584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/media\/17577"}],"wp:attachment":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/media?parent=17559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/categories?post=17559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/tags?post=17559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}