teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

情報の追加

2018/03/30 08:37

投稿

ogra
ogra

スコア18

title CHANGED
File without changes
body CHANGED
@@ -1,3 +1,4 @@
1
+ (情報が不足しているとのご指摘を受け、情報を追加しました。)
1
2
  お世話になっております。
2
3
  さくらインターネットのレンタルサーバにインストールしてあるWordPressを、さくらのVPSに移行しようとしています。
3
4
  VPSにはCentOS 7をインストールし、ディストリビューション標準のApache、PHP、MariaDBをインストールして、そこにレンタルサーバのWordPressのファイルとデータベースをコピーしました。
@@ -15,4 +16,216 @@
15
16
  ほとんどの画像は問題なく表示されており、サイトの文字は文字化けしておらず、レイアウトも崩れていません。
16
17
  どうやら、日本語のファイル名でWordPressにアップロードした画像がリンク切れとなっているように見えますが、多数アップロードされている画像の中からそれらを特定するのは困難です。
17
18
  このような場合、WordPressの管理画面で画像をアップロードし直す以外に、どのようにしたらリンク切れを解決できるでしょうか。
18
- よろしくお願いします。
19
+ よろしくお願いします。
20
+
21
+ ### 移行元サーバ(さくらのレンタルサーバ スタンダード)
22
+
23
+ OS: FreeBSD 9.1-RELEASE-p24 amd64
24
+ Apache: 2.4.29
25
+ PHP: 5.4.45
26
+ MySQL: 5.5.59-log (UTF-8)
27
+
28
+ `$ php -i`の実行結果(日本語関係を含むと思う部分を抜粋)
29
+ ```
30
+ Configuration File (php.ini) Path => /usr/local/php/5.4/etc
31
+ Loaded Configuration File => /usr/local/php/5.4/etc/php.ini
32
+ Scan this dir for additional .ini files => /usr/local/php/5.4/etc/conf.d
33
+ Additional .ini files parsed => (none)
34
+ PHP API => 20100412
35
+ PHP Extension => 20100525
36
+ Zend Extension => 220100525
37
+ Zend Extension Build => API220100525,NTS
38
+ PHP Extension Build => API20100525,NTS
39
+ Debug Build => no
40
+ Thread Safety => disabled
41
+ Zend Signal Handling => disabled
42
+ Zend Memory Manager => enabled
43
+ Zend Multibyte Support => provided by mbstring
44
+ IPv6 Support => enabled
45
+ DTrace Support => disabled
46
+
47
+ Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
48
+ Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
49
+ Registered Stream Filters => zlib.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
50
+
51
+
52
+ Core
53
+
54
+ PHP Version => 5.4.45
55
+
56
+ default_charset => no value => no value
57
+
58
+
59
+ zend.detect_unicode => On => On
60
+ zend.enable_gc => On => On
61
+ zend.multibyte => Off => Off
62
+ zend.script_encoding => no value => no value
63
+
64
+
65
+ iconv
66
+
67
+ iconv support => enabled
68
+ iconv implementation => libiconv
69
+ iconv library version => 1.14
70
+
71
+
72
+ mbstring
73
+
74
+ Multibyte Support => enabled
75
+ Multibyte string engine => libmbfl
76
+ HTTP input encoding translation => disabled
77
+ libmbfl version => 1.3.2
78
+
79
+
80
+ Multibyte (japanese) regex support => enabled
81
+ Multibyte regex (oniguruma) backtrack check => On
82
+ Multibyte regex (oniguruma) version => 4.7.1
83
+
84
+ Directive => Local Value => Master Value
85
+ mbstring.detect_order => no value => no value
86
+ mbstring.encoding_translation => Off => Off
87
+ mbstring.func_overload => 0 => 0
88
+ mbstring.http_input => pass => pass
89
+ mbstring.http_output => pass => pass
90
+ mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml+xml) => ^(text/|application/xhtml+xml)
91
+ mbstring.internal_encoding => no value => no value
92
+ mbstring.language => neutral => neutral
93
+ mbstring.strict_detection => Off => Off
94
+ mbstring.substitute_character => no value => no value
95
+ ```
96
+
97
+ ### 移行先サーバ(さくらのVPS)
98
+
99
+ OS: CentOS Linux release 7.4.1708 (x86_64)
100
+ Apache: 2.4.6
101
+ PHP: 5.4.16
102
+ MariaDB: 5.5.56
103
+
104
+ `$ php -i`の実行結果(日本語関係を含むと思う部分を抜粋)
105
+ ```
106
+ Configuration File (php.ini) Path => /etc
107
+ Loaded Configuration File => /etc/php.ini
108
+ Scan this dir for additional .ini files => /etc/php.d
109
+ Additional .ini files parsed => /etc/php.d/curl.ini,
110
+ /etc/php.d/dom.ini,
111
+ /etc/php.d/fileinfo.ini,
112
+ /etc/php.d/gd.ini,
113
+ /etc/php.d/json.ini,
114
+ /etc/php.d/mbstring.ini,
115
+ /etc/php.d/mcrypt.ini,
116
+ /etc/php.d/mysql.ini,
117
+ /etc/php.d/mysqli.ini,
118
+ /etc/php.d/pdo.ini,
119
+ /etc/php.d/pdo_mysql.ini,
120
+ /etc/php.d/pdo_sqlite.ini,
121
+ /etc/php.d/phar.ini,
122
+ /etc/php.d/posix.ini,
123
+ /etc/php.d/sqlite3.ini,
124
+ /etc/php.d/sysvmsg.ini,
125
+ /etc/php.d/sysvsem.ini,
126
+ /etc/php.d/sysvshm.ini,
127
+ /etc/php.d/wddx.ini,
128
+ /etc/php.d/xmlreader.ini,
129
+ /etc/php.d/xmlwriter.ini,
130
+ /etc/php.d/xsl.ini,
131
+ /etc/php.d/zip.ini
132
+
133
+ PHP API => 20100412
134
+ PHP Extension => 20100525
135
+ Zend Extension => 220100525
136
+ Zend Extension Build => API220100525,NTS
137
+ PHP Extension Build => API20100525,NTS
138
+ Debug Build => no
139
+ Thread Safety => disabled
140
+ Zend Signal Handling => disabled
141
+ Zend Memory Manager => enabled
142
+ Zend Multibyte Support => provided by mbstring
143
+ IPv6 Support => enabled
144
+ DTrace Support => disabled
145
+
146
+ Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
147
+ Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
148
+ Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
149
+
150
+
151
+ Core
152
+
153
+ PHP Version => 5.4.16
154
+
155
+ default_charset => no value => no value
156
+
157
+
158
+ zend.detect_unicode => On => On
159
+ zend.enable_gc => On => On
160
+ zend.multibyte => Off => Off
161
+ zend.script_encoding => no value => no value
162
+
163
+
164
+ iconv
165
+
166
+ iconv support => enabled
167
+ iconv implementation => glibc
168
+ iconv library version => 2.17
169
+
170
+
171
+ mbstring
172
+
173
+ Multibyte Support => enabled
174
+ Multibyte string engine => libmbfl
175
+ HTTP input encoding translation => disabled
176
+ libmbfl version => 1.3.2
177
+
178
+
179
+ Multibyte (japanese) regex support => enabled
180
+ Multibyte regex (oniguruma) backtrack check => On
181
+ Multibyte regex (oniguruma) version => 4.7.1
182
+
183
+ Directive => Local Value => Master Value
184
+ mbstring.detect_order => no value => no value
185
+ mbstring.encoding_translation => Off => Off
186
+ mbstring.func_overload => 0 => 0
187
+ mbstring.http_input => pass => pass
188
+ mbstring.http_output => pass => pass
189
+ mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml+xml) => ^(text/|application/xhtml+xml)
190
+ mbstring.internal_encoding => no value => no value
191
+ mbstring.language => neutral => neutral
192
+ mbstring.strict_detection => Off => Off
193
+ mbstring.substitute_character => no value => no value
194
+ ```
195
+
196
+ `$ mysql -u root -p -e 'status'`の実行結果
197
+ ```
198
+ mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
199
+
200
+ Connection id: 1690
201
+ Current database:
202
+ Current user: root@localhost
203
+ SSL: Not in use
204
+ Current pager: stdout
205
+ Using outfile: ''
206
+ Using delimiter: ;
207
+ Server: MariaDB
208
+ Server version: 5.5.56-MariaDB MariaDB Server
209
+ Protocol version: 10
210
+ Connection: Localhost via UNIX socket
211
+ Server characterset: utf8
212
+ Db characterset: utf8
213
+ Client characterset: utf8
214
+ Conn. characterset: utf8
215
+ UNIX socket: /var/lib/mysql/mysql.sock
216
+ Uptime: 6 hours 24 min 11 sec
217
+
218
+ Threads: 1 Questions: 76062 Slow queries: 0 Opens: 95 Flush tables: 2 Open tables: 121 Queries per second avg: 3.299
219
+ ```
220
+
221
+ ### 表示できないURLとファイル名の対応
222
+
223
+ (ドメイン名の.jpより前のacmeの部分は実際のものとは異なります。)
224
+ `http://acme.jp/wordpress/wp-content/uploads/2015/10/名称未設定-1.png`
225
+ →ファイル名は`å??ç§°æ?ªè¨­å®?-1.png`
226
+
227
+ `http://acme.jp/wordpress/wp-content/uploads/2015/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-0027-07-26-19.43.37.png`
228
+ →ファイル名は`ã?¹ã?¯ã?ªã?¼ã?³ã?·ã?§ã??ã??-0027-07-26-19.43.37.png`
229
+
230
+ 上記のように、ファイル名が文字化けしているようです。
231
+ レンタルサーバからVPSへファイルをコピーするにあたり、単純に`tar`コマンドでtar.gzファイルを作り、それをscpでコピーして展開しただけだったのがいけなかったのでしょうか。