Difference between revisions of "BlogServer - WordPress Installation"

From The TinkerNet Wiki
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...")
 
Line 1: Line 1:
=== Install the LAMP Stack ===
+
===Install the LAMP Stack===
  
 
[[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]]
 
[[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]]
  
=== Install WordPress ===
+
===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' IDENTIFIED BY 'somebody';
+
  GRANT ALL PRIVILEGES ON wp_Someblog.* TO 'somebody'@'localhost' IDENTIFIED BY 'somepassword';
 
  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 36:
 
  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>
  
 
<br />
 
<br />

Revision as of 13:54, 19 June 2020

Install the LAMP Stack

Basic LAMP Stack Install

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' IDENTIFIED BY 'somepassword';
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