Skip to content

Instantly share code, notes, and snippets.

@satzz
Created January 10, 2016 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satzz/59c592b9515ec18a00ed to your computer and use it in GitHub Desktop.
Save satzz/59c592b9515ec18a00ed to your computer and use it in GitHub Desktop.
WordPressをLinuxへCLIインストールする ref: http://qiita.com/satzz/items/78440b3f9430dc937240
$ sudo yum install php php-mysql
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ curl localhost
$ wp core update --version=4.4.1 --force
Updating to version 4.4.1 (ja)...
Using cached file '/home/ec2-user/.wp-cli/cache/core/wordpress-4.4.1-ja-ja.zip'...
更新を展開しています…
Error: パッケージをインストールできませんでした。 PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
$ cd /var/www/html
$ mkdir blog
$ cd blog
$ wp core download --version=4.3.2
$ wp core config --dbhost=host.db --dbname=prefix_db --dbuser=username --dbpass=password
$ chmod 644 wp-config.php
$ wp core install --url=yourwebsite.com --title="Your Blog Title" --admin_name=wordpress_admin --admin_password=password --admin_email=you@example.com
mysql> show tables;
$ sudo chown -R apache:apache .
$ sudo vim /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/blog
ServerName yourwebsite.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
$ sudo service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment