User Tools

Site Tools


setupwordpressubuntu22

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
setupwordpressubuntu22 [2025/04/28 22:50] – created tektinkerssetupwordpressubuntu22 [2025/04/29 00:26] (current) tektinkers
Line 1: Line 1:
-// +[[https://docs.tektinkers.com|TinkersDocs Home]] 
-// +[[https://www.tektinkers.com|Back to tektinkers.com]] 
-//+ 
 +====== Setup Wordpress - Ubuntu 22 ====== 
 +\\ 
 +**Setup Database's Username and Password** 
 +\\ 
 +<code>sudo mysql</code> 
 +<code>mysql -u root -p</code> 
 +<code>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;</code> 
 +//Change wordpressuser and password to whatever you want:// 
 +<code>CREATE USER 'wordpressuser'@'%' IDENTIFIED WITH mysql_native_password BY 'password';</code> 
 +<code>FLUSH PRIVILEGES;</code> 
 +<code>EXIT;</code> 
 +\\ 
 +**Installing Additional PHP Extensions:** 
 +\\ 
 +<code>sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip</code> 
 +<code>sudo systemctl restart apache2</code> 
 +\\ 
 +**Adjust Apache Config to allow overrides and rewrites in .htaccess** 
 +\\ 
 +<code>sudo nano /etc/apache2/sites-available/wordpress.conf</code> 
 +<code> 
 +<VirtualHost *:80> 
 +. . . 
 +    <Directory /var/www/wordpress/> 
 +        AllowOverride All 
 +    </Directory> 
 +. . . 
 +</VirtualHost> 
 +</code> 
 +<code>sudo a2enmod rewrite</code> 
 +<code>sudo apache2ctl configtest</code> 
 +<code>sudo systemctl restart apache2</code> 
 +\\ 
 +**Downloading Wordpress** 
 +\\ 
 +<code>cd /tmp</code> 
 +<code>curl -O https://wordpress.org/latest.tar.gz</code> 
 +<code>tar xzvf latest.tar.gz</code> 
 +<code>touch /tmp/wordpress/.htaccess</code> 
 +<code>cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php</code> 
 +<code>mkdir /tmp/wordpress/wp-content/upgrade</code> 
 +//Change 2nd wordpress to name of directory to put wordpress in// 
 +<code>sudo cp -a /tmp/wordpress/. /var/www/wordpress</code> 
 +\\ 
 +**Configure Wordpress Directory** 
 +\\ 
 +<code>sudo chown -R www-data:www-data /var/www/wordpress</code> 
 +<code>sudo find /var/www/wordpress/ -type d -exec chmod 750 {} \;</code> 
 +<code>sudo find /var/www/wordpress/ -type f -exec chmod 640 {} \;</code> 
 +Copy salts to notepad for safekeeping temporarily 
 +<code>curl -s https://api.wordpress.org/secret-key/1.1/salt/</code> 
 +<code>sudo nano /var/www/wordpress/wp-config.php</code> 
 +//Update file and add line// 
 +<code> 
 +. . . 
 + 
 +// ** MySQL settings - You can get this info from your web host ** // 
 +/** The name of the database for WordPress */ 
 +define( 'DB_NAME', 'wordpress' ); 
 + 
 +/** MySQL database username */ 
 +define( 'DB_USER', 'wordpressuser' ); 
 + 
 +/** MySQL database password */ 
 +define( 'DB_PASSWORD', 'password' ); 
 + 
 +/** 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', '' ); 
 + 
 + 
 +. . . 
 + 
 +define('FS_METHOD', 'direct'); 
 +</code> 
 +\\ 
 +**Complete Install from Web Interface** 
 +\\ 
 +//From the web browser navigate to websites IP or URL// 
 +\\ 
 +\\ 
 +\\
 Credit to: [[https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack|https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack]] Credit to: [[https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack|https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack]]
setupwordpressubuntu22.1745880614.txt.gz · Last modified: 2025/04/28 22:50 by tektinkers