さくらサーバーからXサーバーへの移行にあたり、Class "CPTP_Module_Setting" not foundエラーが発生する

実現したいこと

現在さくらサーバーでホスティングしているWordPressについて、Xサーバーへの移行を行いたい

発生している問題・分からないこと

◼️問題の内容:
さくらサーバーからエクスポートされたSQLの該当箇所(後述)やwp-config.phpについて編集し、サイトを確認しようとするとCPTP_Module_Setting" not found エラーが発生

◼️一通りやったこと:
◯さくらサーバーからエクスポートしたSQLをXサーバーのphpmyadminでそのまま実行
発生エラー:Cannot create databaseなど
原因:phpmyadminではdatabaseのcreateは受け付けておらず、Xサーバーの「MySQL設定」で作成する必要がある
◯Xサーバーの「MySQL設定」でデータベース作成
発生エラー:
イメージ説明
原因:さくらサーバーではアンダーバーを使用した命名が可能だったが、Xサーバーでは不可能。
      
また、[サーバーID] _ [データベース名]という形式を強制される。
    
上記理由より、SQLでデータベース名が記載されている部分の名称変更を行う必要があった
◯SQLのデータベース指定箇所をXサーバーで作成したデータベースに対応するように[サーバーID] _ [データベース名(アンダーバーは削除)]として変更
 
=> データベースの作成完了
◯以下のようにwp-config.phpを編集

php

12define('DB_NAME', 'MySQLデータベース名');3 45define('DB_USER', 'MySQLユーザーID');6 78define('DB_PASSWORD', 'パスワード');9 1011define('DB_HOST', 'ホスト名');

 発生エラー:
添付エラーメッセージのように、モジュール不足についてのエラーが発生

エラーメッセージ

error

1Fatal error: Uncaught Error: Class "CPTP_Module_Setting" not found in /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/CPTP.php:43 Stack trace: #0 /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/CPTP.php(33): CPTP->load_modules() #1 /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/CPTP.php(101): CPTP->__construct() #2 /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/custom-post-type-permalinks.php(58): CPTP::get_instance() #3 /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/custom-post-type-permalinks.php(62): cptp_init() #4 /home/xs884298/xs884298.xsrv.jp/public_html/wp-settings.php(305): include_once('/home/xs884298/...') #5 /home/xs884298/xs884298.xsrv.jp/public_html/wp-config.php(88): require_once('/home/xs884298/...') #6 /home/xs884298/xs884298.xsrv.jp/public_html/wp-load.php(37): require_once('/home/xs884298/...') #7 /home/xs884298/xs884298.xsrv.jp/public_html/wp-blog-header.php(13): require_once('/home/xs884298/...') #8 /home/xs884298/xs884298.xsrv.jp/public_html/index.php(17): require('/home/xs884298/...') #9 {main} thrown in /home/xs884298/xs884298.xsrv.jp/public_html/wp-content/plugins/custom-post-type-permalinks/CPTP.php on line 43

該当のソースコード

特になし

試したこと・調べたこと

上記の詳細・結果

添付のエラーメッセージが表示される。

補足

特になし

コメントを投稿

0 コメント