LoginSignup
0
2

More than 5 years have passed since last update.

[Wordpress] Deploy wordpress

Last updated at Posted at 2015-02-22

Upload the file to the

# If need zip the wordpress folder to zip file.
zip -r wordpress.zip wordpress

# Use scp to upload the zip file to your user home directory
scp wordpress.zip user@ip-address:~/

# Unzip the file
unzip wordpress.zip

# Move to the /var/www folder
mv wordpress /var/www/

Change apache root folder

Open the file /etc/httpd/conf/httpd.conf and edit this to line to the root directory of your wordpress.

DocumentRoot "/var/www/wordpress"

<Directory "/var/www/wordpress"

Restart your apache

/etc/init.d/httpd restart

Create mysql database

Enter mysql and create a database for wordpress.

create database wordpress;

Create a mysql user for wordpress

# Create a new user
create user 'wordpress'@'localhost' identified by 'password'

# Grant wordpress database to this user
grant all on wordpress.* to 'wordpress'@'localhost';

Change wordpress config sample file name

If you have some problem that wordpress can not write wp-config.php, try this.

cd /var/www/wordpress
mv wp-config-sample.php wp-config.php
# Also not forget to change wp-config.php content.

Now enter your ip address then follow the guid of wordpress to config your wordpress

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2