Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step 1: Install Apache Web Server
- $ sudo apt-get install apache2 apache2-utils
- Step 2: Install MySQL Database Server
- $ sudo apt-get install mysql-client mysql-server
- The database server deployment is not yet secure,
- $ sudo mysql_secure_installation
- Step 3: Install PHP and Modules
- $ sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-cli php7.0-cgi php7.0-gd
- to test if php is working with the web server create a info.php file in /var/www/html
- sudo gedit /var/www/html/info.php
- <?php
- phpinfo();
- ?>
- open web browser and type this address http://localhost/info.php
- Step 4: Install WordPress CMS
- $ wget -c http://wordpress.org/latest.tar.gz
- $ tar -xzvf latest.tar.gz
- move the WordPress files to the Apache root directory, /var/www/html/
- $ sudo rsync -av wordpress/* /var/www/html/
- give permission
- $ sudo chown -R www-data:www-data /var/www/html/
- $ sudo chmod -R 755 /var/www/html/
- Step 5: Create WordPress Database name wp
- $ mysql -u root -p
- mysql> CREATE DATABASE wp;
- mysql> GRANT ALL PRIVILEGES ON wp.* TO 'your_username_here'@'localhost' IDENTIFIED BY 'your_chosen_password_here';
- mysql> FLUSH PRIVILEGES;
- mysql> EXIT;
- Go the /var/www/html/ directory and rename wp-config-sample.php to wp-config.php:
- $ sudo mv /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
- then update it with your database information under the MySQL settings section in wp-config.php file
- restart the web server and mysql service
Add Comment
Please, Sign In to add comment