Skip to content

Instantly share code, notes, and snippets.

View rick4470's full-sized avatar

Rick rick4470

View GitHub Profile
@rick4470
rick4470 / gist:28a340d84e8fb3bc8e83066d69122087
Created April 6, 2017 20:32
Setup WordPress Config files
cd /var/www/portfolio
touch .htaccess
chmod 660 .htaccess
mv wp-config-sample.php wp-config.php
@rick4470
rick4470 / gist:e71014d759d3e00ce17b08016a31acca
Created April 6, 2017 20:29
Download and Install WordPress
cd /var/www/
sudo rm -R html/
mkdir portfolio
cd portfolio/
curl -O https://wordpress.org/latest.tar.gz
tar -zxf latest.tar.gz -C .
mv wordpress/* .
rm latest.tar.gz
rm -R wordpress/
@rick4470
rick4470 / gist:c9322414951436081299751a19879c79
Created April 6, 2017 20:19
Additional WordPress Plugins for Ubuntu
sudo apt-get install php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc
CREATE DATABASE portfolio;
GRANT ALL ON portfolio.* TO 'portfolio-admin'@'localhost' IDENTIFIED BY 'SET STRONG PASSWORD';
FLUSH PRIVILEGES;
EXIT;
rick@ubuntu:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.17-0ubuntu0.16.04.2 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
rick@ubuntu:~$ sudo rm /var/www/html/index.php
http://ip-address-of-webserver/
@rick4470
rick4470 / verify.php
Last active April 6, 2017 18:20
Verify php install
<?php
phpinfo();
?>
rick@ubuntu:~$ sudo rm /var/www/html/index.html
rick@@ubuntu:~$ touch /var/www/html/index.php
rick@@ubuntu:~$ sudo vim /var/www/html/index.php
rick@ubuntu:~$ sudo vim /etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.php index.cgi index.pl index.html index.xhtml index.htm
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
rick@ubuntu:~$ sudo systemctl restart apache2