{"id":221,"date":"2023-11-18T19:08:09","date_gmt":"2023-11-18T10:08:09","guid":{"rendered":"http:\/\/34.127.79.68\/wordpress\/?p=221"},"modified":"2023-12-17T23:07:05","modified_gmt":"2023-12-17T14:07:05","slug":"wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e7%a7%bb%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/takenokonosato.myvnc.com\/wordpress\/2023\/11\/18\/wordpress%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e7%a7%bb%e8%a1%8c\/","title":{"rendered":"WordPress\u306e\u30b5\u30fc\u30d0\u30fc\u79fb\u884c"},"content":{"rendered":"<p>\u3053\u308c\u307e\u3067\u3055\u304f\u3089\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3063\u3066\u3044\u305f\u304c\u3001FreeBSD\u3060\u3068\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3068\u3057\u3066\u3057\u304b\u4f7f\u3046\u3053\u3068\u304c\u306a\u3044\u306e\u3067\u3001Google Cloud Platform\u306b\u79fb\u884c\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\nWordPress\u306e\u30d6\u30ed\u30b0\u306e\u30b5\u30fc\u30d0\u30fc\u79fb\u884c\u3067\u3044\u308d\u3044\u308d\u306f\u307e\u308a\u3069\u3053\u308d\u304c\u3042\u3063\u305f\u306e\u3067\u5099\u5fd8\u9332\u3068\u3057\u3066\u8a18\u3057\u3066\u304a\u304f\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001\u3055\u304f\u3089\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306ephp\u30d0\u30fc\u30b8\u30e7\u30f3\u306f7.4\u3002\u3053\u308c\u3092GCP\u5074\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u540c\u3058\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h1>1. \u79fb\u884c\u5148\u30b5\u30fc\u30d0\u30fc\u306e\u6e96\u5099<\/h1>\n<h2>1.1. VM\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9<\/h2>\n<p>\u3042\u307e\u308a\u904b\u7528\u8cbb\u3092\u304b\u3051\u305f\u304f\u306a\u3044\u306e\u3067\u3001\u4e0b\u8a18\u306e\u6761\u4ef6\u3067VM \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3002<br \/>\n\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u505c\u6b62\u3057\u305f\u5834\u5408\u3067\u3082IP\u30a2\u30c9\u30ec\u30b9\u304c\u5909\u308f\u3089\u306a\u3044\u3088\u3046\u3001\u56fa\u5b9a\u3057\u3066\u304a\u304f\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9805\u76ee<\/th>\n<th>\u5024<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u30be\u30fc\u30f3<\/td>\n<td>us-west1-b<\/td>\n<\/tr>\n<tr>\n<td>CPU<\/td>\n<td>e2-micro<\/td>\n<\/tr>\n<tr>\n<td>OS<\/td>\n<td>Ubuntu 22.04 amd64<\/td>\n<\/tr>\n<tr>\n<td>\u30d6\u30fc\u30c8\u30c7\u30a3\u30b9\u30af\u306e\u7a2e\u985e<\/td>\n<td>\u6a19\u6e96\u6c38\u7d9a\u30c7\u30a3\u30b9\u30af<\/td>\n<\/tr>\n<tr>\n<td>\u30b5\u30a4\u30ba<\/td>\n<td>30GB<\/td>\n<\/tr>\n<tr>\n<td>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb<\/td>\n<td>Allow HTTP traffic, Allow HTTPS traffic<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>1.2. WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u4e0b\u8a18\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u69cb\u7bc9\u3002<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/qiita.com\/cherubim1111\/items\/b259493a39e36f5d524b\">Ubuntu 22.04 LTS \u306b WordPress 6.2 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><br \/>\n\u82e5\u5e72php\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u5834\u6240\u304c\u3042\u308b\u306e\u3067\u3001\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3002<\/p>\n<h3>1.2.1. \u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u8a2d\u5b9a<\/h3>\n<pre><code class=\"language-shell \">sudo timedatectl set-timezone Asia\/Tokyo\n<\/code><\/pre>\n<h3>1.2.2. Apache2 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre><code class=\"language-shell \">sudo apt -y update\nsudo apt -y install apache2 \nsudo systemctl enable apache2\nsudo systemctl start apache2\n<\/code><\/pre>\n<p>mod_rewrite\u3092\u6709\u52b9\u5316\u3002\u3053\u308c\u3092\u3084\u3063\u3066\u3044\u306a\u3044\u3068\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306f\u898b\u308c\u308b\u306e\u306b\u3001\u305d\u308c\u4ee5\u5916\u306e\u30da\u30fc\u30b8\u306f\u3059\u3079\u3066404\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/p>\n<pre><code class=\"language-shell \">sudo a2enmod rewrite\nsudo vi \/etc\/apache2\/sites-enabled\/000-default.conf\n<\/code><\/pre>\n<p>11\u884c\u76ee\u4ed8\u8fd1\u3002<\/p>\n<pre><code class=\"\">\u2026\n        ServerAdmin webmaster@localhost\n        DocumentRoot \/var\/www\/html\n        &lt;Directory \/var\/www\/html&gt;\n                AllowOverride All\n        &lt;\/Directory&gt;\n\u2026\n<\/code><\/pre>\n<p>Apache2\u3092\u518d\u8d77\u52d5\u3002<\/p>\n<pre><code class=\"language-shell \">sudo \/etc\/init.d\/apache2 restart\n<\/code><\/pre>\n<h3>1.2.3. PHP 7.4 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre><code class=\"language-shell \">sudo apt install software-properties-common\nsudo add-apt-repository ppa:ondrej\/php\nsudo apt install php7.4 php7.4-mysql\n<\/code><\/pre>\n<h3>1.2.4. MariaDB \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre><code class=\"language-shell \">sudo apt -y install mariadb-server mariadb-client\nsudo systemctl enable mariadb\nsudo systemctl start mariadb\n<\/code><\/pre>\n<h3>1.2.5. WordPress \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre><code class=\"language-shell \">cd \/var\/www\/html\nsudo wget https:\/\/ja.wordpress.org\/latest-ja.tar.gz\nsudo tar xvf latest-ja.tar.gz\nsudo chown -R www-data:www-data .\n<\/code><\/pre>\n<h3>1.2.6. MariaDB \u306b\u63a5\u7d9a<\/h3>\n<pre><code class=\"language-shell \">sudo mariadb\n<\/code><\/pre>\n<h3>1.2.7. MariaDB\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210<\/h3>\n<p>\u3053\u3053\u3067\u4f7f\u7528\u3057\u305fwordpress(DB\u540d), username, password\u3092\u521d\u671f\u8a2d\u5b9a\u753b\u9762\u3067\u4f7f\u7528<\/p>\n<pre><code class=\"language-sql \">CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8;\nGRANT ALL ON wordpress.* TO username@localhost IDENTIFIED BY 'password';\nFLUSH PRIVILEGES;\n<\/code><\/pre>\n<h3>1.2.8. WordPress\u521d\u671f\u8a2d\u5b9a<\/h3>\n<p>web\u30d6\u30e9\u30a6\u30b6\u3067 xx.xx.xx.xx\/wordpress \u306b\u30a2\u30af\u30bb\u30b9\u3002username, password\u3092\u5165\u529b\u3002<\/p>\n<h3>1.2.9. all in one wp migration \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>WordPress\u4e0a\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u30b5\u30a4\u30ba\u4e0a\u9650\u304c2MB\u3068\u5c0f\u3055\u3044\u306e\u3067\u3001\u4e0b\u8a18\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306bv6.68\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/takatoblog.org\/all-in-one-wp-migration\/\">\u30102023\u5e74\u7248\u3011All-in-One WP Migration\u306e\u5bb9\u91cf\u3092\u7121\u6599\u3067\u4e0a\u3052\u308b\u65b9\u6cd5\uff01<\/a><br \/>\n\u3053\u3053\u307e\u3067\u304d\u305f\u3089\u3001\u3044\u3063\u305f\u3093\u79fb\u884c\u5143\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u306e\u6e96\u5099\u3092\u3059\u308b\u3002<\/p>\n<h1>2. \u79fb\u884c\u5143\u30b5\u30fc\u30d0\u30fc\u306e\u6e96\u5099<\/h1>\n<h2>2.1. WordPress\u306e\u6700\u65b0\u7248\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/h2>\n<p>\u7ba1\u7406\u753b\u9762\u306e\u30a2\u30ca\u30a6\u30f3\u30b9\u901a\u308a\u3001\u66f4\u65b0\u3059\u308b\u3002<\/p>\n<h2>2.2. all in one wp migration \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u5148\u307b\u3069\u3068\u540c\u69d8\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<h2>2.3. \u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/h2>\n<p>FILE\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u3002<br \/>\n\u4eca\u56de\u306f250MB\u7a0b\u5ea6\u3060\u3063\u305f\u306e\u3067\u3001\u7279\u306b\u554f\u984c\u306a\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5b8c\u4e86\u3002<\/p>\n<h1>3. \u79fb\u884c\u5148\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<\/h1>\n<p>2.3\u3067\u6e96\u5099\u3057\u305fwpress\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3002<br \/>\nPROCEED\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u753b\u9762\u306f\u300cxxxx\u30d5\u30a1\u30a4\u30eb\u3092\u5fa9\u5143\u4e2d\u300d\u2192\u300c\u30d6\u30ed\u30b0\u306e\u6e96\u5099\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u300d\u2192\u300cmu-plugins\u3092\u6709\u52b9\u5316\u3057\u307e\u3057\u305f\u300d\u2192\u5b8c\u4e86\u3068\u9077\u79fb\u3059\u308b\u3002<br \/>\n\u300cmu-plugins\u3092\u6709\u52b9\u304b\u3057\u307e\u3057\u305f\u300d\u3067\u6b62\u307e\u3063\u3066\u3044\u305f\u304c\u3001php\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c8.1\u3060\u3063\u305f\u306e\u304c\u539f\u56e0\u3060\u3063\u305f\u3002<br \/>\n\u305d\u306e\u5834\u5408\u306f\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u524a\u9664\u3057\u3066\u304b\u3089\u30011.2.3. \u3092\u3084\u308a\u306a\u304a\u305b\u3070OK\u3002<\/p>\n<pre><code class=\"language-shell \">sudo apt purge php-8.1* -y\n<\/code><\/pre>\n<h1>4. \u30c9\u30e1\u30a4\u30f3\u540d\u306e\u53d6\u5f97<\/h1>\n<p>GCP\u3060\u3068IP\u30a2\u30c9\u30ec\u30b9\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u602a\u3057\u3044\u30b5\u30a4\u30c8\u611f\u304c\u3067\u308b\u306e\u3067\u3001<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/my.noip.com\/\">No-IP<\/a>\u3067\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u767b\u9332\u3059\u308b\u3002<br \/>\n\u7121\u6599\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u300130\u65e5\u306b\u4e00\u56de\u30a2\u30af\u30bb\u30b9\u3057\u306a\u3044\u3068\u6d88\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u307e\u3067\u3055\u304f\u3089\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3063\u3066<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":8,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/221\/revisions\/234"}],"wp:attachment":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}