Advertisement
apfelcast

NC- wordpress

Apr 2nd, 2021
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. #### Install Worpress on exsisting Nextcloud Installtion ####
  2.  
  3. ## create wordpress databse ##
  4.  
  5. # create database called wordpress
  6. CREATE DATABASE wordpress;
  7.  
  8. # create database user with password
  9. CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password_here';
  10.  
  11. #grant accesss to databse
  12. GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
  13.  
  14. #save changes and exit
  15. FLUSH PRIVILEGES;
  16. EXIT;
  17.  
  18. ## Download lastest wordpress version ##
  19. cd /tmp && wget https://wordpress.org/latest.zip
  20. unzip latest.zip
  21. mv wordpress /var/www
  22.  
  23. ## create apache config ##
  24. nano /etc/apache2/sites-available/wordpress.conf
  25.  
  26. <VirtualHost *:80>
  27. ServerAdmin master@domain.com
  28. DocumentRoot /var/www/wordpress/
  29. ServerName demo.apfelcast.com
  30. ServerAlias www.demo.apfelcast.com
  31.  
  32. Alias /wordpress "/var/www/wordpress/"
  33.  
  34. <Directory /var/www/wordpress/>
  35. Options +FollowSymlinks
  36. AllowOverride All
  37. Require all granted
  38. <IfModule mod_dav.c>
  39. Dav off
  40. </IfModule>
  41. SetEnv HOME /var/www/wordpress
  42. SetEnv HTTP_HOME /var/www/wordpress
  43. </Directory>
  44.  
  45. ErrorLog ${APACHE_LOG_DIR}/error.log
  46. CustomLog ${APACHE_LOG_DIR}/access.log combined
  47.  
  48. </VirtualHost>
  49.  
  50. a2ensite wordpress.conf
  51.  
  52. service apache2 restart
  53.  
  54. ## adjust access to folders ##
  55. chown -R www-data:www-data /var/www/wordpress/
  56. chmod -R 755 /var/www/wordpress/
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement