1.wordpress download
> wget https://ko.wordpress.org/wordpress-4.8-ko_KR.tar.gz
2.wordpress 압축 풀기
> cd <내려받은 경로>
> tar -xvzf wordpress-4.8-ko_KR.tar.gz
3.path name 변경
> mv wordpress <site name>
4. 소유자, 권한 변경
> chown -R www-data:www-data <site name>
> chmod -R 755 <site name>
5. database 생성
> mysql -u root -p
> create database <database name>;
> create user ‘<user name>’@” identified by ‘<password>’; ((생략 가능))
> grant all on <database name>.* to ‘<user name>’@‘localhost’;
> flush privileges;
6. config
> cd <site_path>
> cp wp-config-sample.php wp-config.php
> chown -R www-data:www-data wp-config.php
> vi wp-config.php
>> define(‘DB_NAME’, ‘database_name_here’);
>> define(‘DB_USER’, ‘username_here’);
>> define(‘DB_PASSWORD’, ‘password_here’);
7. apache restart
> service apache2 restart
8.subdomain 추가.(선택)
> /etc/apache2/sites-available
> vi 000-default.conf
>>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
serverName <subdomain> (ex: portfolio.e-luda.com)
DocumentRoot /var/www/html/<site>
ErrorLog NULL/error.log
CustomLog NULL/access.log combined
</VirtualHost>
* 기존 user 확인
1. use mysql;
2. select user, host from user;