<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WordPress &#8211; Sandy Scott&#039;s Web Spot</title>
	<atom:link href="https://www.sandyscott.net/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sandyscott.net</link>
	<description>My little corner of the web</description>
	<lastBuildDate>Fri, 05 Jun 2020 11:40:01 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Server Setup 0: Contents</title>
		<link>https://www.sandyscott.net/2020/06/server-setup-0-contents/</link>
					<comments>https://www.sandyscott.net/2020/06/server-setup-0-contents/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 04 Jun 2020 08:29:10 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Collabora]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=666</guid>

					<description><![CDATA[Hello and welcome to my series of posts on setting up a server to run Debian Linux, hosting a WordPress and a Nextcloud installation The idea is to take you through all the steps needed to get up and running, some basic familiarity with computers and Linux is assumed, but...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/06/server-setup-0-contents/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p>Hello and welcome to my series of posts on setting up a server to run Debian Linux, hosting a WordPress and a Nextcloud installation</p>



<p>The idea is to take you through all the steps needed to get up and running, some basic familiarity with computers and Linux is assumed, but not a lot.</p>



<ul class="wp-block-list"><li><a href="https://www.sandyscott.net/2020/05/18/server-setup-1-os-installation/" data-type="350">Server Setup 1: OS installation</a><br>This goes through a few pre-requisites, and then launches into the installation.</li><li><a href="https://www.sandyscott.net/2020/05/18/server-setup-2-initial-tweaks/" data-type="419">Server Setup 2: Initial tweaks</a><br>These first few steps will make your life easier when administering this server.</li><li><a href="https://www.sandyscott.net/2020/05/19/server-setup-3-install-webserver/" data-type="475">Server Setup 3: Install Webserver</a><br>We&#8217;ll install and test the webserver software &#8211; Apache.</li><li><a href="https://www.sandyscott.net/2020/05/20/server-setup-4-going-public/" data-type="508">Server Setup 4: Going Public</a><br>Configure the server, DNS and your router to allow public access to a placeholder website.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-5-https/" data-type="519">Server Setup 5: HTTPS</a><br>Enable secure connections to your new website with Lets Encrypt and certbot.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-4-wordpress-pre-requisites/" data-type="484">Server Setup 6: WordPress Pre-requisites</a><br>Get ourselves ready to install WordPress &#8211; we need PHP and a database.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-7-install-wordpress/" data-type="539">Server Setup 7: Install WordPress</a><br>Get WordPress installed so you have a functional website!</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-8-wordpress-tweaks/" data-type="562">Server Setup 8: WordPress tweaks</a><br>A few tweaks to optimise WordPress.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-9-nextcloud-prep/" data-type="564">Server Setup 9: Nextcloud Prep</a><br>Preparatory work before the Nextcloud installation.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-10-nextcloud-installation/" data-type="575">Server Setup 10: Nextcloud Installation</a><br>Get the database and files system configured, then install Nextcloud</li><li><a href="https://www.sandyscott.net/2020/05/22/server-setup-11-config-improvements/" data-type="582">Server Setup 11: Config Improvements</a><br>Some little tweaks to improve the security of our server</li><li><a href="https://www.sandyscott.net/2020/05/24/server-setup-12-collabora/" data-type="612">Server Setup 12: Collabora</a><br>Install and configure Collabora Online Development Edition</li><li><a href="https://www.sandyscott.net/2020/05/25/server-setup-13-security-improvements/" data-type="621">Server Setup 13: Security Improvements</a><br>Move the WordPress configuration out of the web root</li><li><a href="https://www.sandyscott.net/2020/06/01/server-setup-14-backups/" data-type="516">Server Setup 14: Backups</a><br>This shows how to collect together all the data you need to completely back up your server.</li><li><a href="https://www.sandyscott.net/2020/06/01/server-setup-15-optional-extras/" data-type="602">Server Setup 15: Optional Extras</a><br>Further optional tweaks to make your installation better.</li></ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/06/server-setup-0-contents/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 15: Optional Extras</title>
		<link>https://www.sandyscott.net/2020/06/server-setup-15-optional-extras/</link>
					<comments>https://www.sandyscott.net/2020/06/server-setup-15-optional-extras/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Mon, 01 Jun 2020 17:56:43 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[tmux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=602</guid>

					<description><![CDATA[Now you&#8217;re up and running with what should be a stable and secure installation of WordPress and Nextcloud with Collabora. There are plenty more tweaks you can work on yourself: Server Administration Advanced HTTPS &#8211; you can check your config with https://www.ssllabs.com/ssltest/. You have choices about how you want to...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/06/server-setup-15-optional-extras/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>Now you&#8217;re up and running with what should be a stable and secure installation of WordPress and Nextcloud with Collabora.</p>



<p>There are plenty more tweaks you can work on yourself:</p>



<h2 class="wp-block-heading">Server Administration</h2>



<ul class="wp-block-list"><li>Advanced HTTPS &#8211; you can check your config with <a href="https://www.ssllabs.com/ssltest/">https://www.ssllabs.com/ssltest/</a>. You have choices about how you want to set up your system &#8211; more secure or more compatible with older clients. <a href="https://ssl-config.mozilla.org/#server=apache">This tool from Mozilla</a>  provides recommendations for the the Apache configuration you need.</li><li>Email configuration &#8211; This allows either system to send emails. Best way to do it us an existing email service, and let your server connect to that. s-nail and exim can both do this.</li><li>You can keep you system automatically up to date with the <code>unattened-upgrades</code> package &#8211; this keeps your system up to date. If email is configure it&#8217;ll send you an summary of what it&#8217;s updated.</li></ul>



<h2 class="wp-block-heading">WordPress:</h2>



<p>WordPress relies on htaccess for a few things, mainly nicely writing urls for permalinks. However, .htaccess files have a problem &#8211; they&#8217;re checked every time someone visits your site. You can reconfigure apache to load the data from the .htaccess file once, instead of on every request.</p>



<p>Be careful, there may be multiple .htaccess files, and some plugins install their own, so use these commands to find them all:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var/www/wordpress
find | grep htaccess</pre></div>



<h2 class="wp-block-heading">Nextcloud</h2>



<p>A few ideas:</p>



<ul class="wp-block-list"><li>Work your way through the list in administration section &#8211; the links to the documentation will help a lot.</li><li>Background jobs: Try setting up a systemd timer or traditional crontab. Have a look in <strong>Basic Settings</strong> in the <strong>Settings</strong> menu for an Administrator. </li><li>Scan you installation for security issues <a href="https://scan.nextcloud.com/">https://scan.nextcloud.com/</a></li><li>Include .htaccess instead of loading it every time, like for WordPress.</li></ul>



<h2 class="wp-block-heading">User friendliness</h2>



<p>These are a few niceties you might try to help with general use:</p>



<ul class="wp-block-list"><li>Set up passwordless login: <a href="https://linuxize.com/post/how-to-setup-passwordless-ssh-login/">https://linuxize.com/post/how-to-setup-passwordless-ssh-login/</a></li><li>Use <a href="https://github.com/tmux/tmux/wiki">tmux </a>to keep you shell sessions alive.</li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/06/server-setup-15-optional-extras/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 13: Security Improvements</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Mon, 25 May 2020 11:20:15 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=621</guid>

					<description><![CDATA[One recommendation that many security experts make is that the WordPress configuration files should be outside the web root. Lets make this change. WordPress Create a new folder called /var/www_config. Put a new folder in here, wordpress Copy the WordPress configuration file across, and set it&#8217;s permissions so no-one apart...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>One recommendation that many security experts make is that the WordPress configuration files should be outside the web root. Lets make this change.</p>



<h2 class="wp-block-heading">WordPress</h2>



<p>Create a new folder called <code>/var/www_config</code>. Put a new folder in here, <code>wordpress</code></p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var
sudo mkdir www_config
cd www_config
sudo mkdir wordpress</pre></div>



<p>Copy the WordPress configuration file across, and set it&#8217;s permissions so no-one apart from www-data (and root, of course) can read it:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo cp -a /var/www/wordpress/wp-config.php /var/www_config/wordpress/
sudo chown -R www-data:www-data /var/www_config
sudo chmod -R u=rX,go= /var/www_config</pre></div>



<p>Now we need to tell Apache that the when PHP scripts on the wordpress site run, they can only access the folders we want them to:</p>



<ul class="wp-block-list"><li>/var/www/wordpress : our wordpress installation</li><li>/var/www_config/wordpress : our wordpress config</li><li>/tmp : WordPress needs this for handling plugin upgrades etc.</li></ul>



<p>Modify the wordpress Apache site configuration file and add this line inside the VirtualHost section:</p>



<p><code>php_admin_value open_basedir "/var/www/wordpress/:/var/www_config/wordpress/:/tmp/"</code></p>



<p>Now reload Apache.</p>



<p>Finally, WordPress still needs to be able to find this file, so replace the contents of the original wp_config.php with this:</p>



<pre class="wp-block-code"><code>&lt;?php

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

/** Location of your WordPress configuration. */
require_once('/var/www_config/wordpress/wp-config.php');</code></pre>



<p>It&#8217;ll take effect the moment you save it, so now visit your site from the client, and hopefully nothing has broken!</p>



<h2 class="wp-block-heading">Nextcloud</h2>



<p>For some reason this isn&#8217;t as widely recommended by Nextcloud users. I&#8217;ll investigate and update this post with my suggestion.</p>



<p>For now, just make sure only www-data can read and write the config file:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudo cp -a /var/www/wordpress/wp-config.php /var/www_config/wordpress/Shell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo chown -R www-data:www-data /var/www/nextcloud/config/
sudo chmod -R u=rX,go= /var/www/nextcloud/config/</pre></div>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 8: WordPress tweaks</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-8-wordpress-tweaks/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-8-wordpress-tweaks/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 May 2020 16:04:07 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Akismet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=562</guid>

					<description><![CDATA[Most of these steps are optional, but highly recommended Set up Anti-Spam Spam comments are an unfortunate reality of life on the internet, so you&#8217;ll need something to stop them. Akismet is a highly respected solution, and is free for personal users, but you need to sign up for a...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-8-wordpress-tweaks/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>Most of these steps are optional, but highly recommended</p>



<h2 class="wp-block-heading">Set up Anti-Spam</h2>



<p>Spam comments are an unfortunate reality of life on the internet, so you&#8217;ll need something to stop them.</p>



<p><a href="https://akismet.com/">Akismet</a> is a highly respected solution, and is free for personal users, but you need to sign up for a free account with them first. There&#8217;s a lot more details about getting set up on their website.</p>



<p>There are other Antispam plugins out there too.</p>



<h2 class="wp-block-heading">Delete Inactive themes and plugins</h2>



<p>It&#8217;s recommended (for security) that you delete any plugins or themes you aren&#8217;t using, with the execption of leaving one standard theme available to use as a fallback.</p>



<p>Go to the plugins section from the menu on the left. There should be a red delete link under each inactive plugin</p>



<p>Go to the themes section. Click on an inactive theme, then find the delete link in the bottom-right corner.</p>



<h2 class="wp-block-heading">Add domain name to server hosts file</h2>



<p>WordPress can report some weird errors when it can&#8217;t access itself, which can sometimes happen if your router is misbehaving or you&#8217;re running offline for some reason.</p>



<p>To do this we add an entry to the server&#8217;s hosts file. This tells the server that our wordpress domain (e.g. www.example.org) should be on this server.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;suShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/hosts</pre></div>



<p>Add this line, anywhere</p>



<pre class="wp-block-code"><code>127.0.0.1 www.example.org</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-8-wordpress-tweaks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 7: Install WordPress</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-7-install-wordpress/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-7-install-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 May 2020 15:24:12 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=539</guid>

					<description><![CDATA[After this post you&#8217;ll have a working WordPress installation to play with! Make website unavailable from public internet A word of warning &#8211; the first thing that will happen once we&#8217;ve installed wordpress is you&#8217;ll create an admin user. You don&#8217;t want a hacker to swoop in a beat you...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-7-install-wordpress/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>After this post you&#8217;ll have a working WordPress installation to play with!</p>



<h2 class="wp-block-heading">Make website unavailable from public internet</h2>



<p>A word of warning &#8211; the first thing that will happen once we&#8217;ve installed wordpress is you&#8217;ll create an admin user. You don&#8217;t want a hacker to swoop in a beat you to it.</p>



<p>Reverse the steps you took to open the ports in your router.</p>



<h2 class="wp-block-heading">Download and unpack</h2>



<p>Go to the directory above your wordpress folder &#8211; mine was /var/www/wordpress, so we&#8217;ll go to /var/www</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var/www</pre></div>



<p>Delete your wordpress directory &#8211; we&#8217;re about to recreate it:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudo Shell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo rm -R wordpress</pre></div>



<p>Download wordpress</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo wget https://wordpress.org/latest.tar.gz</pre></div>



<p>Unpack &#8211; the tar.gz file is like a zip file, so we&#8217;re just unpacking it.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo tar xvfz latest.tar.gz</pre></div>



<p>Optional step &#8211; if the folder you set up for the website wasn&#8217;t called &#8220;wordpress&#8221;, move the new folder to what it used to be called:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mv wordpress other_wp_folder	</pre></div>



<p>Now wordpress needs to be able to modify the files inside it&#8217;s directory, so to do that we change the owner of the directory and everything in it to www-data. www-data is the user that apache runs as.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo chown -R www-data /var/www/wordpress/</pre></div>



<p>And we&#8217;re done with the install!</p>



<h2 class="wp-block-heading">Configure</h2>



<p>Now go to your site on the client machine e.g www.example.org</p>



<p>If all has gone according to plan, you&#8217;ll this page  (asking for a language) or the next one. </p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-26.png"><img fetchpriority="high" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-26.png" alt="" class="wp-image-547" width="181" height="338" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-26.png 362w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-26-161x300.png 161w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-26-80x150.png 80w" sizes="(max-width: 181px) 100vw, 181px" /></a><figcaption>WordPress language selection</figcaption></figure>



<p>This is the intro to the configuration:</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-23.png"><img decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-23.png" alt="" class="wp-image-544" width="382" height="291" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-23.png 764w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-23-300x228.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-23-150x114.png 150w" sizes="(max-width: 382px) 100vw, 382px" /></a><figcaption>WordPress configuration introduction</figcaption></figure>



<p>Now fill in the database details from the <a href="https://www.sandyscott.net/2020/05/21/server-setup-4-wordpress-pre-requisites/">last post</a> in here.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-24.png"><img decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-24.png" alt="" class="wp-image-545" width="380" height="270" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-24.png 759w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-24-300x213.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-24-150x107.png 150w" sizes="(max-width: 380px) 100vw, 380px" /></a></figure>



<p>This page sets the site title (it&#8217;s doesn&#8217;t need to be the URL &#8211; it can be anything you like) and your admin account.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-28.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-28.png" alt="" class="wp-image-550" width="378" height="428" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-28.png 755w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-28-265x300.png 265w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-28-132x150.png 132w" sizes="(max-width: 378px) 100vw, 378px" /></a></figure>



<p>And that&#8217;s done!</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-29.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-29.png" alt="" class="wp-image-551" width="377" height="217" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-29.png 754w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-29-300x173.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-29-150x86.png 150w" sizes="(max-width: 377px) 100vw, 377px" /></a></figure>



<p>This is the admin console</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-33.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-33.png" alt="" class="wp-image-556" width="365" height="259" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-33.png 1458w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-33-300x213.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-33-1024x727.png 1024w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-33-768x545.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-33-150x106.png 150w" sizes="(max-width: 365px) 100vw, 365px" /></a></figure>



<p>And the view of the site when you&#8217;re logged in.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-31.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-31.png" alt="" class="wp-image-553" width="365" height="259" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-31.png 1458w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-31-300x213.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-31-1024x727.png 1024w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-31-768x545.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-31-150x106.png 150w" sizes="(max-width: 365px) 100vw, 365px" /></a></figure>



<p>And what it looks like for ordinary visitors.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-32.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-32.png" alt="" class="wp-image-554" width="365" height="259" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-32.png 1458w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-32-300x213.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-32-1024x727.png 1024w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-32-768x545.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-32-150x106.png 150w" sizes="(max-width: 365px) 100vw, 365px" /></a></figure>



<h2 class="wp-block-heading">Re-enable public access</h2>



<p>Now you can re-enable public access by configuring port forwarding on your router.</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-7-install-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 6: WordPress Pre-requisites</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-4-wordpress-pre-requisites/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-4-wordpress-pre-requisites/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 May 2020 14:13:22 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=484</guid>

					<description><![CDATA[WordPress is a very flexible platform, but there are a few key pieces that are essential for it to run: A websever We installed Apache in an earlier post so that&#8217;s covered, though we will need some extra modules. PHP This is the programming language WordPress is built in and...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-4-wordpress-pre-requisites/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>WordPress is a very flexible platform, but there are a few key pieces that are essential for it to run:</p>



<ul class="wp-block-list"><li>A websever<ul><li>We installed Apache in an earlier post so that&#8217;s covered, though we will need some extra modules.</li></ul></li><li>PHP<ul><li>This is the programming language WordPress is built in and runs on, so our server needs to have it installed.</li></ul></li><li>A Database<ul><li>We&#8217;ll install MariaDB, which is powerful &amp; popular solution.</li></ul></li></ul>



<p>The full details are on the WordPress website, and we&#8217;ll refer back to this for the specifics in a bit: <a href="https://make.wordpress.org/hosting/handbook/handbook/server-environment/">https://make.wordpress.org/hosting/handbook/handbook/server-environment/</a></p>



<p>First, lets install PHP</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install php</pre></div>



<p>It&#8217;s worth paying some attention to what apt is actually doing at his point:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sandy@waldorf:/var/www/test$ sudo apt install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libapache2-mod-php7.3 libsodium23 php-common php7.3 php7.3-cli php7.3-common php7.3-json
  php7.3-opcache php7.3-readline psmisc
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php7.3 libsodium23 php php-common php7.3 php7.3-cli php7.3-common php7.3-json
  php7.3-opcache php7.3-readline psmisc
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,377 kB of archives.
After this operation, 17.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
</pre></div>



<p>In the list of packages that will be installed, <code>php7.3</code> has been selected. This is the current stable version of PHP, and is the default in Debian 10. Also, <code>libapache2-mod-php7.3</code> will be installed &#8211; this is the Apache module that lets it run php code when to create the web pages you see.</p>



<p>We can test this with the <code>phpinfo();</code> function, which does a similar thing to the http://test.example.org/server-info page we created in the previous post.</p>



<p>Create a file called phpinfo.php in the folder for the test website:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /var/www/test/phpinfo.php</pre></div>



<p>Type in this line:</p>



<pre class="wp-block-code"><code>&lt;?php phpinfo(); ?></code></pre>



<p>Now visit <a href="http://test.example.org/phpinfo.php">http://test.example.org/phpinfo.php</a>. You should get a long page full of information that looks like this:</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-19.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-19.png" alt="" class="wp-image-485" width="521" height="246" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-19.png 1041w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-19-300x141.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-19-1024x483.png 1024w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-19-768x362.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-19-150x71.png 150w" sizes="(max-width: 521px) 100vw, 521px" /></a></figure>



<p>All of the headings on this page after <strong>HTTP Headers Information</strong> and before <strong>Additional Modules</strong> are the modules that PHP has loaded and can be used by php webpages on your server.</p>



<p>If we compare that list of modules, to the list of extensions required by WordPress, we might find some gaps. This is the list from my server:</p>



<figure class="wp-block-table php-wp-modulecompattable"><table class="has-fixed-layout"> <thead> <tr> <th>Required by WordPress</th> <th>Installed on myserver</th> </tr> </thead> <tbody> <tr class="php-wp-module-notrequired"> <td> </td> <td>calendar</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>Core</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>ctype</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>curl</td> <td></td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>date</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>dom</td> <td></td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>exif</td> <td>exif</td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>fileinfo</td> <td>fileinfo</td> </tr> <tr class="php-wp-module-notrequired"> <td></td> <td>filter</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>ftp</td> </tr> <tr> <td></td> <td></td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>gettext</td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>hash</td> <td>hash</td> </tr> <tr class="php-wp-module-notrequired"> <td></td> <td>iconv</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>imagick</td> <td></td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>json</td> <td>json</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>libxml</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>mbstring</td> <td></td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>mysqli</td> <td></td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>openssl</td> <td>openssl</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>pcntl</td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>pcre</td> <td>pcre</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>PDO</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>Phar</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>posix</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>readline</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>Reflection</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>session</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>shmop</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>sockets</td> </tr> <tr class="php-wp-module-requiredandpresent"> <td>libsodium* (the documentation is slightly out of date, sodium replaces libsodium)</td> <td>sodium</td> </tr> <tr class="php-wp-module-notrequired"> <td></td> <td>SPL</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>standard</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>sysvmsg</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>sysvsem</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>sysvshm</td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>tokenizer</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>xml</td> <td></td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>Zend OPcache</td> </tr> <tr class="php-wp-module-requiredbutmissing"> <td>zip</td> <td></td> </tr> <tr class="php-wp-module-notrequired"> <td> </td> <td>zlib</td> </tr> </tbody> </table> </figure>



<p>So the missing ones are:</p>



<ul class="wp-block-list"><li>curl</li><li>dom</li><li>imagick</li><li>mbstring</li><li>mysqli</li><li>xml</li><li>zip</li></ul>



<p>So we&#8217;ll install them. The package names take the form of <code>php-</code> or <code>php7.3-</code>  and then the module name. The <code>dom</code> module is provided within the <code>php-xml</code> package. <code>mysqli </code>is in <code>php-mysql</code>.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install php-curl php-imagick php7.3-mbstring php-mysql php-xml php-zip</pre></div>



<p>For some reason, some of these need to be enabled manually,  the others just work.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo phpenmod -s apache2 curl mbstring mysqli</pre></div>



<p>Restart the webserver:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo systemctl restart apache2</pre></div>



<h2 class="wp-block-heading">Database</h2>



<p>The Database holds all of the live content in your wordpress blog, like the posts and comments. It also has all of the user information.</p>



<p>We&#8217;ll install mariadb</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install mariadb-server</pre></div>



<p>Now we&#8217;ll use a ready-made script to set basic security options. You&#8217;ll need to create a strong password for root user for the database server (not the same as the root user of the system).</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mysql_secure_installation</pre></div>



<p>Say yes to all of the options, entering the database server root password when prompted.</p>



<p>Now create the actual worpress database in the database server. Start by logging into the database with the mysql command line client, and enter the password when prompted.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mysql -u root -p</pre></div>



<pre class="wp-block-code"><code>sandy@waldorf:/etc/php/7.3/apache2$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 57
Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB &#91;(none)]></code></pre>



<p>You&#8217;re now logged into a special command line that&#8217;s just for working on the database server. This command creates the database &#8211; the name could be anything &#8211; just remember it for later. I&#8217;ve called mine <code>wp_db</code>.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;sql&quot;,&quot;mime&quot;:&quot;text/x-sql&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;SQL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;sql&quot;}">CREATE DATABASE wp_db;</pre></div>



<p>Then next command creates the user that WordPress will use to access this database. It also sets their password and gives them access to the database. Fill in your own values for <code>wp_db</code>, <code>wp_usr </code>and <code>password</code>.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;sql&quot;,&quot;mime&quot;:&quot;text/x-sql&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;SQL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;sql&quot;}">GRANT ALL PRIVILEGES ON wp_db.* TO &quot;wp_usr&quot;@&quot;localhost&quot; IDENTIFIED BY &quot;password&quot;;</pre></div>



<p>Now force the database to reload that user information and exit:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;sql&quot;,&quot;mime&quot;:&quot;text/x-sql&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;SQL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;sql&quot;}">FLUSH PRIVILEGES;
EXIT</pre></div>



<p>This is what the whole interraction looks like on my system:</p>



<pre class="wp-block-code"><code>sandy@waldorf:/etc/php/7.3/apache2$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 57
Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB &#91;(none)]> CREATE DATABASE wp_db;
Query OK, 1 row affected (0.001 sec)

MariaDB &#91;(none)]> GRANT ALL PRIVILEGES ON wp_db.* TO "wp_usr"@"localhost" IDENTIFIED BY "password";
Query OK, 0 rows affected (0.001 sec)

MariaDB &#91;(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)

MariaDB &#91;(none)]> EXIT
Bye</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-4-wordpress-pre-requisites/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Updating WordPress</title>
		<link>https://www.sandyscott.net/2013/11/updating-wordpress/</link>
					<comments>https://www.sandyscott.net/2013/11/updating-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 Nov 2013 23:17:34 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://www.sandyscott.net/?p=56</guid>

					<description><![CDATA[EDIT: Don&#8217;t follow this, a properly set up installation will keep itself updated Updating wordpress: mkdir ~/temp cd ~/temp/ wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz cd /var/www/html/ sudo rm -Rf wp-admin/ sudo rm -Rf wp-includes/ sudo cp -R ~/temp/wordpress/wp-admin/ . sudo cp -R ~/temp/wordpress/wp-includes/ . rsync -vcrultO ~/temp/wordpress/wp-content/ wp-content/ sudo chgrp...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2013/11/updating-wordpress/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[<p>EDIT: Don&#8217;t follow this, a properly set up installation will keep itself updated</p>
<p>Updating wordpress:</p>
<pre>mkdir ~/temp
cd ~/temp/
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz

cd /var/www/html/

sudo rm -Rf wp-admin/
sudo rm -Rf wp-includes/

sudo cp -R ~/temp/wordpress/wp-admin/ .
sudo cp -R ~/temp/wordpress/wp-includes/ .


rsync -vcrultO ~/temp/wordpress/wp-content/ wp-content/

sudo chgrp -R apache .
sudo chown -R apache .

rsync -nvcrultO --exclude 'wp-content' --exclude 'wp-includes' --exclude 'wp-admin' ~/temp/wordpress/* .
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2013/11/updating-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
