Created
November 18, 2019 15:10
-
-
Save linuxfemale/6d7719f94f6c4a40eaf2b7bea98655db to your computer and use it in GitHub Desktop.
WordPress into LAMP stack server on Ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u root -p | |
CREATE DATABASE wordpressdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password'; | |
FLUSH PRIVILEGES; | |
EXIT: | |
sudo nano /etc/apache2/sites-available/wordpress.conf | |
<Directory /var/www/wordpress/> | |
AllowOverride All | |
</Directory> | |
sudo a2enmod rewrite | |
sudo apache2ctl configtest | |
sudo systemctl restart apache2 | |
cd /tmp | |
curl -O https://wordpress.org/latest.tar.gz | |
tar xzvf latest.tar.gz | |
touch /tmp/wordpress/.htaccess | |
mv /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php | |
mkdir /tmp/wordpress/wp-content/upgrade | |
rm -rf /var/www/html | |
sudo cp -a /tmp/wordpress/. /var/www/wordpress | |
sudo chown -R sarif:www-data /var/www/wordpress | |
sudo find /var/www/wordpress/ -type d -exec chmod 750 {} \; | |
sudo find /var/www/wordpress/ -type f -exec chmod 640 {} \; | |
curl -s https://api.wordpress.org/secret-key/1.1/salt/ | |
sudo nano /var/www/wordpress/wp-config.php | |
define('DB_NAME', 'wordpress'); | |
/** MySQL database username */ | |
define('DB_USER', 'wordpressuser'); | |
/** MySQL database password */ | |
define('DB_PASSWORD', 'password'); | |
define('FS_METHOD', 'direct'); | |
define('AUTH_KEY', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('SECURE_AUTH_KEY', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('LOGGED_IN_KEY', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('NONCE_KEY', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('AUTH_SALT', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('SECURE_AUTH_SALT', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('LOGGED_IN_SALT', 'VALUES COPIED FROM THE COMMAND LINE'); | |
define('NONCE_SALT', 'VALUES COPIED FROM THE COMMAND LINE'); | |
sudo systemctl restart apache2 | |
sudo systemctl status apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment