状況
CentOS7(さくらVPS)にWordpressとPHP7.1インストールし、かつテーマ(Customify/Astra)をダウンロードした。 テーマの開発元が提供するコンテンツやデザインなどのサンプルデータをインストールしようとしたが、先に進めなくなった。
Customifyの場合
ボタンをクリック後、ロード状態から先に進まない
![customify_import_error](/media/customify_import_error.png)
Astraの場合
下記エラーとモーダルの表示で先に進めない
Starter Templates import requires XMLReader extension to be installed. Please contact your web hosting provider and ask them to install and activate the XMLReader PHP extension.
![astra_import_error](/media/astra_import_error.jpg)
PHP のインストール方法
下記コマンドの実行
yum install --enablerepo=remi,remi-php71 php php-devel php-mbstring php-mysqlnd php-pdo php-gd
エラー内容
PHP7.1にphp-xmlがインストールされていないので、データがダウンロードできない。
解決方法
下記コマンドの実行
yum --enablerepo=remi,remi-php71 install php-xml
サーバーのリスタート
systemctl restart httpd.service
補足
ただ yum php-xml
だけでは下記になる場合がある。PHP5.4ではなく、PHP7.1にphp-xmlをインストールする必要がある。
Error: Package: php-xml-5.4.45-18.el7.remi.x86_64 (remi)