{"id":30428,"date":"2024-11-18T19:24:35","date_gmt":"2024-11-18T10:24:35","guid":{"rendered":"http:\/\/www.inoue.gr.jp\/?p=30428"},"modified":"2024-11-27T09:58:25","modified_gmt":"2024-11-27T00:58:25","slug":"wordpress%e5%bc%95%e3%81%a3%e8%b6%8a%e3%81%97%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"http:\/\/www.inoue.gr.jp\/index.php\/2024\/11\/18\/30428\/","title":{"rendered":"WordPress\u5f15\u3063\u8d8a\u3057\u30e1\u30e2"},"content":{"rendered":"<p>CentOS7<br \/>\nWordPress 4.7.26<br \/>\nphp 5.4.16<br \/>\n\u304b\u3089<\/p>\n<p>AlmaLinux 8<br \/>\nWordPress 6.7<br \/>\nphp 8.2.10<\/p>\n<p>\u306b\u304a\u5f15\u8d8a\u3057\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\uff11\uff09\u6e96\u5099<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nMySQL\u306eroot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a<\/p>\n<p>mysqladmin -u root password rootpasswd<br \/>\nmysqladmin -p -u root -h localhost password rootpasswd<br \/>\nEnter password: rootpasswd<br \/>\nmysqladmin -p reload<br \/>\nEnter password: rootpasswd<\/p>\n<p>\u6b21\u306bWordPress\u7528\u306eMySQL\u306e\u30e6\u30fc\u30b6\u3092\u4f5c\u6210<\/p>\n<p>mysql -u root -p<br \/>\nEnter password: rootpasswd<br \/>\nmysql&gt; grant all privileges on *.* to wp@localhost identified by &#8216;wppasswd&#8217;;<br \/>\nmysql&gt; exit<\/p>\n<p>WordPress\u7528\u306eMySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9wordpress\u306e\u4f5c\u6210<\/p>\n<p>mysql -u wp -p<br \/>\nEnter password: wppasswd<br \/>\nmysql&gt; create database wp default character set utf8;<br \/>\nmysql&gt; exit<\/p>\n<p>MySQL\u306e\u30c7\u30fc\u30bf\u3092\u65e7\u30b5\u30fc\u30d0\u304b\u3089\u30b3\u30d4\u30fc<\/p>\n<p>wp\u30e6\u30fc\u30b6\u306ewp\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/p>\n<p>\u65b0\u898f\u30b5\u30fc\u30d0\u306b\u3066\u4f5c\u696d<br \/>\ncd \/tmp<br \/>\nssh hoge@(\u65e7\u30b5\u30fc\u30d0) &#8220;mysqldump -u wp -p wp&#8221; | cat &gt; wpdump.sql<br \/>\npassword : wppasswd<\/p>\n<p>MySQL\u306e\u30c7\u30fc\u30bf\u3092\u5fa9\u5143<br \/>\nmysql -u wp -p wp&lt; wpdump.sql<br \/>\npassword : wppasswd<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\uff12\uff09\u6b21\u306fWordPress\u672c\u4f53\u3092\u30b2\u30c3\u30c8<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\ncd \/usr\/local\/src<br \/>\nwget https:\/\/ja.wordpress.org\/latest-ja.tar.gz<br \/>\ntar zxvf latest-ja.tar.gz<br \/>\ncp -R .\/wordpress\/* \/var\/www\/html\/<br \/>\nchown -R apache:apache \/var\/www\/html\/<\/p>\n<p>\u521d\u671f\u8a2d\u5b9a<br \/>\ncd \/var\/www\/html<br \/>\ncp wp-config-sample.php wp-config.php<\/p>\n<p>vi wp-config.php<br \/>\n\/* WordPress \u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d *\/<br \/>\ndefine(&#8216;DB_NAME&#8217;, &#8216;wp&#8217;);<br \/>\n\/* MySQL \u306e\u30e6\u30fc\u30b6\u30fc\u540d *\/<br \/>\ndefine(&#8216;DB_USER&#8217;, &#8216;wp&#8217;);<br \/>\n\/* MySQL \u306e\u30d1\u30b9\u30ef\u30fc\u30c9 *\/<br \/>\ndefine(&#8216;DB_PASSWORD&#8217;, &#8216;wppasswd&#8217;);<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\uff13\uff09\u30c6\u30fc\u30de\u3068\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u30c7\u30fc\u30bf\u3092\u30b3\u30d4\u30fc<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\u30c6\u30fc\u30de\u306e\u30b3\u30d4\u30fc<br \/>\n\u65e7\u30b5\u30fc\u30d0\u304b\u3089\u30b3\u30d4\u30fc\u3059\u308b<\/p>\n<p>\u65b0\u898f\u30b5\u30fc\u30d0\u306b\u3066\u4f5c\u696d<br \/>\ncd \/usr\/local\/src<br \/>\nssh hogeuser@(\u65e7\u30b5\u30fc\u30d0) &#8220;cd \/var\/www\/html; tar -czvf &#8211; wp-content\/themes\/hogethemes&#8221; | tar -zvxf &#8211;<\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30b3\u30d4\u30fc<br \/>\ncd \/var\/www\/html<br \/>\nssh hogeuser@(\u65e7\u30b5\u30fc\u30d0) &#8220;cd \/var\/www\/html; tar -czvf &#8211; wp-content\/plugins&#8221; | tar -zvxf &#8211;<\/p>\n<p>\u30c7\u30fc\u30bf\u3092\u30b3\u30d4\u30fc\u3059\u308b<br \/>\nssh hogeuser@(\u65e7\u30b5\u30fc\u30d0) &#8220;cd \/var\/www\/html; tar -czvf &#8211; wp-content\/uploads&#8221; | tar -zvxf &#8211;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\uff14\uff09\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>\u65b0\u30b5\u30fc\u30d0\u306eWordPress\u306b\u30a2\u30af\u30bb\u30b9<\/p>\n<p>http:\/\/(\u65b0\u30b5\u30fc\u30d0) \/wp-admin<\/p>\n<p>\u3053\u3053\u3067\u30a4\u30f3\u30bf\u30fc\u30ca\u30eb\u30b5\u30fc\u30d0\u30a8\u30e9\u30fc\uff08\uff15\uff10\uff10\uff09\u304c\u767a\u751f<\/p>\n<p>\/var\/log\/httpd\/access_log\u3092\u898b\u3066\u3082\u3088\u304f\u308f\u304b\u3089\u306a\u3044<\/p>\n<p>php\u306e\u30c8\u30e9\u30d6\u30eb\u3089\u3057\u3044\u306e\u3067<br \/>\n\/var\/log\/php-fpm\/www-error.log\u3092\u898b\u3066\u307f\u308b<br \/>\n\u3061\u306a\u307f\u306bAlmaLinux8\u306f\u3001httpd\u3068php\u306e\u901a\u4fe1\u306e\u305f\u3081php-fpm\u3068\u3044\u3046\u306e\u3092\u4f7f\u3063\u3066\u3044\u308b<\/p>\n<p>PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in \/var\/www\/html\/wp-content\/plugins\/count-per-day\/counter-core.php on line 1520<\/p>\n<p>count-per-day\u3068\u8a00\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u3063\u3066\u3044\u305f\u304c\u3001\u3053\u308c\u304cphp8\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044<br \/>\n\u3059\u3067\u306b\u30b5\u30dd\u30fc\u30c8\u3082\u3055\u308c\u3066\u3044\u306a\u3044<br \/>\n\u672c\u6765\u306a\u3089\u3001\u5f15\u3063\u8d8a\u3059\u524d\u306b\u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304a\u3051\u3070\u3088\u304b\u3063\u305f\u306e\u3060\u304c\u3001\u3059\u3067\u306b\u624b\u9045\u308c<br \/>\n\u306a\u306e\u3067\u3001counter-core.php\u3092\u4fee\u6b63<\/p>\n<p>Array\u306b{ }\u306f\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u306e\u3067[ ]\u306b\u4fee\u6b63<\/p>\n<p>&lt; $last = strtolower($val{strlen($val)-1});<br \/>\n&#8212;<br \/>\n&gt; $last = strtolower($val[strlen($val)-1]);<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\u3082\u3046\u4e00\u5ea6\u65b0\u30b5\u30fc\u30d0\u306eWordPress\u306b\u30a2\u30af\u30bb\u30b9<\/p>\n<p>http:\/\/(\u65b0\u30b5\u30fc\u30d0) \/wp-admin<\/p>\n<p>\u518d\u5ea6\u30a4\u30f3\u30bf\u30fc\u30ca\u30eb\u30b5\u30fc\u30d0\u30a8\u30e9\u30fc\uff08\uff15\uff10\uff10\uff09\u304c\u767a\u751f<\/p>\n<p>\/var\/log\/php-fpm\/www-error.log\u3092\u898b\u3066\u307f\u308b<\/p>\n<p>PHP Fatal error: Uncaught Error: Call to undefined function create_function() in \/var\/www\/html\/wp-content\/themes\/core_tcd027\/widget\/ad.php:111<\/p>\n<p>\u30c6\u30fc\u30de\u3067\u4f7f\u3063\u3066\u3044\u308b\u30a6\u30a4\u30b8\u30a7\u30c3\u30c8\u304cphp8\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3089\u3057\u3044<br \/>\n\u4e8b\u524d\u306b\u6700\u65b0\u7248\u306b\u66f4\u65b0\u3057\u3066\u3044\u308c\u3070\u3088\u304b\u3063\u305f\u306e\u3060\u304c\u3001\u3059\u3067\u306b\u624b\u9045\u308c<br \/>\n\u4ed5\u65b9\u306a\u3044\u306e\u3067ad.php\u4ed6\u591a\u6570\u3092\u4fee\u6b63<\/p>\n<p>create_function\u3092function\u306b\u5909\u66f4<\/p>\n<p>&lt;\u3000\u3000add_action(&#8216;widgets_init&#8217;, create_function(&#8221;, &#8216;return register_widget(&#8220;ml_ad_widget&#8221;);&#8217;));<br \/>\n&#8212;<br \/>\n&gt;\u3000\u3000add_action(&#8216;widgets_init&#8217;, function(){return register_widget(&#8220;ml_ad_widget&#8221;);});<\/p>\n<p>\u306a\u3069\u306a\u3069<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\u3082\u3046\u4e00\u5ea6\u65b0\u30b5\u30fc\u30d0\u306eWordPress\u306b\u30a2\u30af\u30bb\u30b9<\/p>\n<p>http:\/\/(\u65b0\u30b5\u30fc\u30d0) \/wp-admin<\/p>\n<p>\u518d\u5ea6\u30a4\u30f3\u30bf\u30fc\u30ca\u30eb\u30b5\u30fc\u30d0\u30a8\u30e9\u30fc\uff08\uff15\uff10\uff10\uff09\u304c\u767a\u751f<\/p>\n<p>\/var\/log\/php-fpm\/www-error.log\u3092\u898b\u3066\u307f\u308b<\/p>\n<p>PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), 0 passed in \/var\/www\/html\/wp-includes\/class-wp-widget-factory.php on line 62 and at least 2 expected in \/var\/www\/html\/wp-includes\/class-wp-widget.php:163<\/p>\n<p>\u8abf\u3079\u3066\u307f\u308b\u3068WordPress8.2\u306e\u30d0\u30b0\u3089\u3057\u3044<\/p>\n<p>html\/wp-includes\/class-wp-widget-factory.php\u3092\u4fee\u6b63<\/p>\n<p>&lt;\u3000\u3000$this-&gt;widgets[ $widget ] = new $widget();<br \/>\n&#8212;<br \/>\n&gt;\u3000\u3000$this-&gt;widgets[ $widget ] = new $widget( $widget, $widget );<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\u3082\u3046\u4e00\u5ea6\u65b0\u30b5\u30fc\u30d0\u306eWordPress\u306b\u30a2\u30af\u30bb\u30b9<\/p>\n<p>http:\/\/(\u65b0\u30b5\u30fc\u30d0) \/wp-admin<\/p>\n<p>\u3088\u3046\u3084\u304f\u52d5\u3044\u305f<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\uff15\uff09\u8ffd\u8a18<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>\u4fee\u6b63\u3057\u305fWordPress\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u81ea\u52d5\u66f4\u65b0\u3055\u308c\u308b\u3068\u5143\u306b\u623b\u308a\u3001\u540c\u3058\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u53e4\u3044\u30c6\u30fc\u30de\u3092\u4f7f\u3046\u306e\u3092\u3084\u3081\u3066\u3001\u65b0\u3057\u3044\u306e\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"CentOS7 WordPress 4.7.26 php 5.4.16 \u304b\u3089 AlmaLinux 8 WordPress 6.7...","protected":false},"author":2,"featured_media":30429,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-30428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unix"],"_links":{"self":[{"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/posts\/30428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/comments?post=30428"}],"version-history":[{"count":2,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/posts\/30428\/revisions"}],"predecessor-version":[{"id":30768,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/posts\/30428\/revisions\/30768"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/media\/30429"}],"wp:attachment":[{"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/media?parent=30428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/categories?post=30428"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.inoue.gr.jp\/index.php\/wp-json\/wp\/v2\/tags?post=30428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}