Difference between revisions of "BlogServer - WordPress Installation"
Jump to navigation
Jump to search
(Created page with "=== Install the LAMP Stack === Basic LAMP Stack Install === Install WordPress === * <code>wget -c <nowiki>http://wordpress.org/late...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | === Install the LAMP Stack | + | * Proven on Mint 19.3 ... (Seems to get MySQL 5.7) |
+ | *Proven on Mint 20 ... (Gets MySQL 8.0) | ||
+ | *Proven on SparkyLinux 5.11 ... (You'll have to [https://tecadmin.net/install-mysql-server-on-debian9-stretch/ fix the missing MySQL] thing & install vim first) | ||
+ | **[[Getting MySQL onto SparkyLinux]] | ||
+ | *Proven on LMDE 4 ... (You'll have to [https://linuxize.com/post/how-to-install-mysql-on-debian-10/ fix the missing MySQL] thing & install vim first) | ||
+ | |||
+ | <span style="color:#c0392b">'''NOTE:''' These instructions, as they stand, set up WordPress as just a part of your existing web site. (eg.: www.foo.bar/WP)</span> | ||
+ | |||
+ | ==Install the LAMP Stack== | ||
[[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]] | [[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]] | ||
− | + | ==Install WordPress== | |
− | * <code>wget -c <nowiki>http://wordpress.org/latest.tar.gz</nowiki></code> | + | *<code>wget -c <nowiki>http://wordpress.org/latest.tar.gz</nowiki></code> |
− | * <code>tar -xzvf latest.tar.gz</code> | + | *<code>tar -xzvf latest.tar.gz</code> |
− | * <code>sudo rsync -av wordpress/* /var/www/html/WP/</code> | + | *<code>sudo rsync -av wordpress/* /var/www/html/WP/</code> |
− | * <code>sudo chown -R www-data:www-data /var/www/html/</code> | + | *<code>sudo chown -R www-data:www-data /var/www/html/</code> |
− | * <code>sudo chmod -R 755 /var/www/html/</code> | + | *<code>sudo chmod -R 755 /var/www/html/</code> |
− | * <code>sudo mysql -u root -p</code> | + | *<code>sudo mysql -u root -p</code> |
− | ** To wipe the database if needed... | + | **To wipe the database if needed... |
− | ** <code>DROP DATABASE wp_Someblog;</code> | + | **<code>DROP DATABASE wp_Someblog;</code> |
CREATE DATABASE wp_Someblog; | CREATE DATABASE wp_Someblog; | ||
− | GRANT ALL PRIVILEGES ON wp_Someblog.* TO 'somebody'@'localhost | + | GRANT ALL PRIVILEGES ON wp_Someblog.* TO 'somebody'@'localhost'; |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
EXIT; | EXIT; | ||
− | * <code>sudo mv /var/www/html/WP/wp-config-sample.php /var/www/html/WP/wp-config.php</code> | + | *<code>sudo mv /var/www/html/WP/wp-config-sample.php /var/www/html/WP/wp-config.php</code> |
− | * <code>sudo vim /var/www/html/WP/wp-config.php</code> | + | *<code>sudo vim /var/www/html/WP/wp-config.php</code> |
// ** MySQL settings - You can get this info from your web host ** // | // ** MySQL settings - You can get this info from your web host ** // | ||
Line 36: | Line 44: | ||
define('DB_COLLATE', <nowiki>''</nowiki>); | define('DB_COLLATE', <nowiki>''</nowiki>); | ||
− | * <code>sudo systemctl restart apache2.service</code> | + | *<code>sudo systemctl restart apache2.service</code> |
− | * <code>sudo systemctl restart mysql.service</code> | + | *<code>sudo systemctl restart mysql.service</code> |
+ | |||
+ | == Extra Notes == | ||
+ | === Thing you might trip over === | ||
+ | Some plugins require mod_rewrite & won't work without AllowOverride being enabled in apache2.conf. | ||
+ | |||
+ | * <code>sudo vi /etc/apache2/apache2.conf</code> | ||
+ | |||
+ | Scroll down & find the '''<Directory /var/www/>''' block. | ||
+ | |||
+ | Change '''AllowOverride None''' to '''AllowOverride All''' | ||
− | + | Save the file & restart Apache. |
Latest revision as of 00:21, 23 November 2023
- Proven on Mint 19.3 ... (Seems to get MySQL 5.7)
- Proven on Mint 20 ... (Gets MySQL 8.0)
- Proven on SparkyLinux 5.11 ... (You'll have to fix the missing MySQL thing & install vim first)
- Proven on LMDE 4 ... (You'll have to fix the missing MySQL thing & install vim first)
NOTE: These instructions, as they stand, set up WordPress as just a part of your existing web site. (eg.: www.foo.bar/WP)
Install the LAMP Stack
Install WordPress
wget -c http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
sudo rsync -av wordpress/* /var/www/html/WP/
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/
sudo mysql -u root -p
- To wipe the database if needed...
DROP DATABASE wp_Someblog;
CREATE DATABASE wp_Someblog; GRANT ALL PRIVILEGES ON wp_Someblog.* TO 'somebody'@'localhost'; FLUSH PRIVILEGES; EXIT;
sudo mv /var/www/html/WP/wp-config-sample.php /var/www/html/WP/wp-config.php
sudo vim /var/www/html/WP/wp-config.php
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'wp_Someblog'); /** MySQL database username */ define('DB_USER', 'somebody'); /** MySQL database password */ define('DB_PASSWORD', 'somebody'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
sudo systemctl restart apache2.service
sudo systemctl restart mysql.service
Extra Notes
Thing you might trip over
Some plugins require mod_rewrite & won't work without AllowOverride being enabled in apache2.conf.
sudo vi /etc/apache2/apache2.conf
Scroll down & find the <Directory /var/www/> block.
Change AllowOverride None to AllowOverride All
Save the file & restart Apache.