wordpress 2.9から4.0へ(テスト)

Filed under: wordpress — kdcs @ 15年1月22日 木曜日

ローカル環境にて(xxamp1.8.3-5 → MySQL5.6.20 PHP5.5.15)
wordpress 2.9.1から4.0へのアップグレード
※オリジナルテーマと各種プラグイン使用、アップロードされた画像有りという設定

【wordpress2.9.1のインストール】
xxamp1.8.3環境にてwp2.9.1をインストールし、ログインするとWaningが2か所に出ます。
いずれも「Creating default object from empty value」というもの
これはPHPのコーディングで「クラス宣言」していない部分があるというWaningだそうで
PHP5.4からWaningエラーとして出されるようになっています。
動作には影響なさそうなので各種セッティング・・・

wp-admin/includes/theme.phpの19行目でこのエラーが出ていました

16  function current_theme_info() {
17	$themes = get_themes();
18	$current_theme = get_current_theme();
19	$ct->name = $current_theme;

そこで19行目の前に「$ct = new stdClass;」という1行を追加

16  function current_theme_info() {
17	$themes = get_themes();
18	$current_theme = get_current_theme();
$ct = new stdClass;
19	$ct->name = $current_theme;

これでWaningエラーは出なくなりました

【wordpress4.0.0のインストール】
問題なくインストール

【必要なファイルのコピー】
themes・backup-db・plugins・uploadsファイルを2.9.1から4.0.0へコピー

【データベースのアクセスを切り替える】
wordpress4.0.0のwp-config.phpファイルを開きデータベーステーブルの接頭辞を
wp2.9.1のものに書き換える

【wordpress基本設定のURLを書き換える】
xxamp phpMyAdminでwp2.9.1のoptionsテーブル内のsiteurlを書き換える

wp4.0.0にアクセスすると「データベースを更新します」となるので更新する

これでデーターの引っ越しが完了

どちらのバージョンも日本語なのに、この作業を行うと何故か英語になりました

これは管理画面ダッシュボード>セッティング画面>Site Languageで
日本語を選択すれば日本語表示になります

【ダッシュボード内のwp更新案内を非表示にする】
wp更新案内・wordpressへようこそ・ご利用ありがとうございます
functions.phpファイルに以下を記述

<?php
//wordpressへようこそを非表示
remove_action( 'welcome_panel', 'wp_welcome_panel' );
//本体のアップデート通知を非表示
add_filter('pre_site_transient_update_core', create_function('$a', "return  null;"));
//ご利用ありがとうございますを非表示
add_filter('admin_footer_text', '__return_empty_string');
?>

サイト内検索

カテゴリー

最近の投稿

« |wordpress 2.9から4.0へ(テスト)| »
↑上に戻る