Wordpress 2023: verschil tussen versies

Uit MakerSpace Leiden
Ga naar: navigatie, zoeken
(Nieuwe pagina aangemaakt met 'New setup for Wordpress 2023. Standard Hetzner setup. Enable firewall. Move SSH to port 2222. apt update apt upgrade apt install apache2 php php...')
 
Regel 7: Regel 7:
 
       apt install apache2 php php-mysql
 
       apt install apache2 php php-mysql
 
       apt install mariadb-server mariadb-client
 
       apt install mariadb-server mariadb-client
 +
 +
Then disable external access, remove anon users, etc, etc:
 +
 
       mysql_secure_installation
 
       mysql_secure_installation
  
Create baseline:
+
Create baseline setup with:
  
 
       mysql -u root -p
 
       mysql -u root -p
  
And enter
+
And give the SQL commands:
  
 
       CREATE DATABASE wordpress_db;
 
       CREATE DATABASE wordpress_db;
Regel 21: Regel 24:
 
       Exit;
 
       Exit;
  
Fetch the latest Wordpress and check
+
Fetch the latest Wordpress and check:
  
 
   cd /tmp && wget https://wordpress.org/latest.tar.gz
 
   cd /tmp && wget https://wordpress.org/latest.tar.gz
 +
  openssl sha256 https://wordpress.org/latest.tar.gz
 +
 +
# Check sha256 against the Wordpress website.
 +
 
   cd /var/www/html
 
   cd /var/www/html
   tar zxf /tmp/latest.tar.gz  
+
   tar zxf /tmp/latest.tar.gz
 
   cp -R wordpress /var/www/html
 
   cp -R wordpress /var/www/html
 +
  rm /tmp/latest.tar.gz
 
   chown -R www-data:www-data /var/www/html/wordpress/
 
   chown -R www-data:www-data /var/www/html/wordpress/
 
   chmod -R 755 /var/www/html/wordpress/
 
   chmod -R 755 /var/www/html/wordpress/
Regel 35: Regel 43:
  
 
   vi sites-enabled/000-default.conf  
 
   vi sites-enabled/000-default.conf  
+
 
 
Add settings to /etc/php/*/php.ini:  
 
Add settings to /etc/php/*/php.ini:  
  

Versie van 24 okt 2023 om 21:09

New setup for Wordpress 2023.

Standard Hetzner setup. Enable firewall. Move SSH to port 2222.

     apt update
     apt upgrade
     apt install apache2 php php-mysql
     apt install mariadb-server mariadb-client

Then disable external access, remove anon users, etc, etc:

     mysql_secure_installation

Create baseline setup with:

     mysql -u root -p

And give the SQL commands:

     CREATE DATABASE wordpress_db;
     CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'XXXX';
     GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password';
     FLUSH PRIVILEGES;
     Exit;

Fetch the latest Wordpress and check:

  cd /tmp && wget https://wordpress.org/latest.tar.gz
  openssl sha256 https://wordpress.org/latest.tar.gz 
  1. Check sha256 against the Wordpress website.
  cd /var/www/html
  tar zxf /tmp/latest.tar.gz
  cp -R wordpress /var/www/html
  rm /tmp/latest.tar.gz
  chown -R www-data:www-data /var/www/html/wordpress/
  chmod -R 755 /var/www/html/wordpress/
  mkdir /var/www/html/wordpress/wp-content/uploads
  chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/

Updated the docroot to Wordpress:

  vi sites-enabled/000-default.conf 

Add settings to /etc/php/*/php.ini:

   upload_max_filesize=128M 
   post_max_size=128M 
   memory_limit=256M