Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WP_MatchesMapRegex has a deprecated constructor in /
⚠️階層ファイルがめちゃくちゃなのは、スルーしてくださいw
WordPressの自作テーマの作り方の講座を見ていて急に出て来たエラー
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WP_MatchesMapRegex has a deprecated constructor in /Users/Sites/bootstrap_wp_udemy/B2W Final Course Files/B - Download WordPress/b2w/wp-includes/class-wp.php on line 633
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Translation_Entry has a deprecated constructor in /Users/Sites/bootstrap_wp_udemy/B2W Final Course Files/B - Download WordPress/b2w/wp-includes/pomo/entry.php on line 14
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; POMO_Reader has a deprecated constructor in /Users/Sites/bootstrap_wp_udemy/B2W Final Course Files/B - Download WordPress/b2w/wp-includes/pomo/streams.php on line 12
私が使っていたバージョン
PHP 7.3.1
WP version 4.0.1
WPのバージョンが低いとこのようなことが起きるよう。
参照URL
https://www.php.net/manual/ja/migration70.deprecated.php
解決方法
- バックアップ(直そうとしているファイルのコピー)をとる。理由はわからなくなって元に戻れないと怖いから。
- wp-config.phpとwp-contentフォルダを削除
- 最新のWPのバージョンをとる。私が新しくWPのバージョンをとって来たのは、5.3.2。
- 新しくとってきたwp-config.phpと新しいwp-contentフォルダを差し替える
参照URL
https://kotori-blog.com/wordpress/upgrade/
これでうまく行きました。
差し替えは怖かったですが、バックアップをとっておいたので安心して実行できました。
めでたし、めでたし。
Author And Source
この問題について(Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WP_MatchesMapRegex has a deprecated constructor in /), 我々は、より多くの情報をここで見つけました https://qiita.com/Himekichi/items/ffc249330e8a49a36d06著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .