Wordpressのテーマのカスタマイズができません。
php-fpmのエラーメッセージには
[17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "ID" on null in /var/www/shtml/wp-includes/post.php on line 7586 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/post.php on line 7829 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/nav-menu.php on line 1086 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/theme.php on line 3514 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/theme.php on line 3739 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/post.php on line 5361 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "ID" on null in /var/www/shtml/wp-includes/post.php on line 5361 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_type" on null in /var/www/shtml/wp-includes/post.php on line 4662 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "post_status" on null in /var/www/shtml/wp-includes/class-wp-customize-manager.php on line 2564 [17-Jul-2022 03:15:33 UTC] PHP Warning: Attempt to read property "ID" on null in /var/www/shtml/wp-includes/class-wp-customize-manager.php on line 2570
というエラーがでていました
Wordpress側にはエラーはでていません
使っているテーマ
stork19
phpバージョン 8.0
追記
間違えてWordpressをインストールしているディレクトリ(/var/www/shtml)を削除しました。
その時のコマンドは
rm -rf /var/www/shtml
なので
mkdir /var/www/shtml wget https://ja.wordpress.org/latest-ja.tar.gz tar xvzf latest-ja.tar.gz rmdir wordpress chown -R apache:apache /var/www/shtml
でWordpressの再インストールを行いテーマの変更をすると上記のエラーになります
データベースは前使っていたデータベースです
追記2
Wordpressの標準テーマ(Twenty Twenty-Two)をカスタマイズをしようとしたら
[17-Jul-2022 03:24:33 UTC] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/shtml/wp-includes/class-wp-theme-json-resolver.php:408 Stack trace: #0 /var/www/shtml/wp-admin/site-editor.php(88): WP_Theme_JSON_Resolver::get_user_global_styles_post_id() #1 {main} thrown in /var/www/shtml/wp-includes/class-wp-theme-json-resolver.php on line 408
というエラーがでました
Wordpressでは
"このサイトで重大なエラーが発生しました。"
がでます
回答1件
あなたの回答
tips
プレビュー