This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
computing:selfhostedwp [2023/06/29 05:36] – oemb1905 | computing:selfhostedwp [2023/06/29 06:10] – oemb1905 | ||
---|---|---|---|
Line 28: | Line 28: | ||
Once you have the LAMP stack setup and TLS properly configured, it's time to make some decisions on your php handler and your apache2 multi-processing module (mpm). There' | Once you have the LAMP stack setup and TLS properly configured, it's time to make some decisions on your php handler and your apache2 multi-processing module (mpm). There' | ||
| | ||
- | sudo apt remove libapache2-mod-php --purge | + | sudo apt remove libapache2-mod-php* --purge |
sudo a2enmod ssl | sudo a2enmod ssl | ||
sudo a2enmod headers | sudo a2enmod headers | ||
Line 98: | Line 98: | ||
ssh root@wordpress.com | ssh root@wordpress.com | ||
+ | mkdir Downloads | ||
cd ~/Downloads | cd ~/Downloads | ||
mkdir wpdownload | mkdir wpdownload | ||
Line 112: | Line 113: | ||
sudo mv ~/ | sudo mv ~/ | ||
- | Now, let's set up permissions | + | When the website is in production, use these permissions: |
sudo chown -R www-data: | sudo chown -R www-data: | ||
Line 126: | Line 127: | ||
<Replace the example salts with those you just downloaded using copy/ | <Replace the example salts with those you just downloaded using copy/ | ||
| | ||
- | Let's also add the following line to the '' | + | Sometimes, for reasons I am not sure about, WordPress does not allow users direct uploading. If/when that happens, |
sudo nano / | sudo nano / | ||
< | < | ||
- | Let's now visit site1.com in a web browser. Enter the credentials that you created for the database above. Choose the settings you prefer and set up an admin account and record your credentials securely. You should now have a proper WordPress site! Now that you have a WordPress, check the SiteHealth tab and follow its advice and/or know why you don't. In my case, I typically adjust cache, rewrites, | + | Let's now visit site1.com in a web browser. Enter the credentials that you created for the database above. Choose the settings you prefer and set up an admin account and record your credentials securely. You should now have a proper WordPress site! Now that you have a WordPress, check the SiteHealth tab and follow its advice and/or know why you don't. In my case, I typically adjust cache, rewrites, and headers. |
- | + | ||
- | apt install memcached | + | |
- | nano / | + | |
- | a2enmod cache | + | |
- | + | ||
- | Optimizing | + | |
apt install memcached | apt install memcached | ||
Line 143: | Line 138: | ||
a2enmod cache | a2enmod cache | ||
a2enmod expires | a2enmod expires | ||
+ | a2enmod headers | ||
< | < | ||
Line 174: | Line 170: | ||
Enable headers: | Enable headers: | ||
- | a2enmod headers | ||
< | < | ||
Header always set X-Content-Type-Options " | Header always set X-Content-Type-Options " | ||
Line 230: | Line 225: | ||
Refresh WordPress and it should see the sftp server and allow you to make changes that way. Note: The sftp server is public and anyone can access this with proper credentials even if it not for WordPress so use a proper password and make sure your TLS configuration is working. Your instance should now be pretty solid. The only other thing you might want is more than one WordPress site subdomain, for example, site1.cooldomain.com, | Refresh WordPress and it should see the sftp server and allow you to make changes that way. Note: The sftp server is public and anyone can access this with proper credentials even if it not for WordPress so use a proper password and make sure your TLS configuration is working. Your instance should now be pretty solid. The only other thing you might want is more than one WordPress site subdomain, for example, site1.cooldomain.com, | ||
- | --- // | + | --- // |