<?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 | TekCookie</title>
	<atom:link href="https://tekcookie.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://tekcookie.com</link>
	<description>Everything about IT</description>
	<lastBuildDate>Wed, 24 Nov 2021 14:36:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/06/cropped-TekCookie-211.png?fit=32%2C17&#038;ssl=1</url>
	<title>WordPress | TekCookie</title>
	<link>https://tekcookie.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">174510684</site>	<item>
		<title>Secure your website login using Cloudflare and VPN</title>
		<link>https://tekcookie.com/secure-website-login-using-cloudflare-and-vpn/</link>
					<comments>https://tekcookie.com/secure-website-login-using-cloudflare-and-vpn/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Sat, 25 Sep 2021 17:21:05 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=3415</guid>

					<description><![CDATA[In this article, we will see how to secure the WordPress website login by changing the login URL and by using VPN and Cloudflare firewall. Before we dig into securing the website login, let see some introduction of Cloudflare. What is Cloudflare? As we all know, Cloudflare is one of the best CDN(Content delivery network) [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In this article, we will see how to secure the WordPress website login by changing the login URL and by using VPN and Cloudflare firewall. </p>


				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-a720f743     "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							Table Of Contents						</div>
																<div class="uagb-toc__list-wrap">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#what-is-cloudflare" class="uagb-toc-link__trigger">What is Cloudflare?</a><li class="uagb-toc__list"><a href="#is-cloudflare-just-a-dns-and-cdn" class="uagb-toc-link__trigger">Is Cloudflare just a DNS and CDN?</a><li class="uagb-toc__list"><a href="#why-cloudflare" class="uagb-toc-link__trigger">Why cloudflare?</a><li class="uagb-toc__list"><a href="#benefits-of-using-cloudflare" class="uagb-toc-link__trigger">Benefits of using Cloudflare</a><li class="uagb-toc__list"><a href="#securing-the-wordpress-website-login-using-cloudflare-and-wireguard-vpn" class="uagb-toc-link__trigger">Securing the WordPress website login using Cloudflare and Wireguard VPN</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#changing-the-wordpress-admin-page-url" class="uagb-toc-link__trigger">Changing the WordPress admin page url</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#a-self-hosted-wireguard-vpn" class="uagb-toc-link__trigger">A self-hosted Wireguard VPN</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#cloudflare-firewall-rules" class="uagb-toc-link__trigger">Cloudflare Firewall Rules</a></li></ul></li><li class="uagb-toc__list"><a href="#conclusion" class="uagb-toc-link__trigger">Conclusion</a></ul></ol>					</div>
									</div>
				</div>
			


<p>Before we dig into securing the website login, let see some introduction of Cloudflare.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">What is Cloudflare?</h2>



<p>As we all know, Cloudflare is one of the best CDN(Content delivery network) and DNS(Domain Name System) out there in the market.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Is Cloudflare just a DNS and CDN?</h2>



<p>Well No! It&#8217;s also an internet reverse proxy service provider. There are many security features that come with Cloudflare.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Why cloudflare?</h2>



<p>When the website domain is configured in Cloudflare DNS with &#8220;proxy&#8221; switched on, it acts as a reverse proxy for the website. All the traffic coming into the website and going out of it will be through the Cloudflare security infrastructure. So we can use it to inspect what type of traffic is coming in and to which URL&#8217;s. The malicious content can be filtered out thereby protecting our website. Cloudflare also do provide free SSL for our website and makes it HTTPS. Behind Cloudflare network, it connects to the real web server by different means such as HTTP or HTTPS (strict or flexible)</p>



<p>Need to know more, Have a look at <a href="https://www.cloudflare.com/" target="_blank" rel="noreferrer noopener">https://www.cloudflare.com/</a></p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Benefits of using Cloudflare</h2>



<ul class="wp-block-list"><li>DDoS protection &#8211; As cloudflare faces the internet, it takes the initial hit, so the website is protected in case of a DDoS attack</li><li>Firewall (3 rules in the free plan)</li><li>Rule based page caching (3 rules in the free plan)</li><li>Ultra fast DNS</li><li>Has a reCaptcha feature to get rid of robots.</li><li>Client certificate authentication</li><li>Caching and mimify(html, css and js)</li><li>And many more…</li></ul>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Securing the WordPress website login using Cloudflare and Wireguard VPN</h2>



<p>Now let&#8217;s start the configuration</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Changing the WordPress admin page url</h3>



<p>Everyone knows, the login page of WordPress is https://domainname.com/wp-login.php, so anyone can try a random combination of credentials or even do a brute-force attack.<br>As a precaution, we first change the login URL using a WordPress plugin – <a href="https://wordpress.org/plugins/wps-hide-login/" target="_blank" rel="noreferrer noopener">https://wordpress.org/plugins/wps-hide-login/</a><br>The plugin should be installed which will then appear in the admin panel &#8220;Settings &gt; WPS Hide Login&#8221;. Change the URL to something &#8220;not so common&#8221; and save the settings.</p>



<figure class="wp-block-image size-large is-style-default"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="1024" height="293" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?resize=1024%2C293&#038;ssl=1" alt="" class="wp-image-4751" srcset="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?resize=1024%2C293&amp;ssl=1 1024w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?resize=300%2C86&amp;ssl=1 300w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?resize=768%2C220&amp;ssl=1 768w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?resize=1080%2C309&amp;ssl=1 1080w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/randomurl-secure-cloudflare.webp?w=1190&amp;ssl=1 1190w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>Now the URL of the WordPress login page is changed and when someone tries https://domainname.com/wp-admin they will be redirected to the 404 page or we can set it to any page as required.<br>This gives a certain level of protection as the URL is not a well-known phrase.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">A self-hosted Wireguard VPN</h3>



<p>By self-hosting a VPN(Virtual Private Network) in your cloud VPS, the VPN server will modify the source IP address of the traffic to the VPN server&#8217;s IP address. Connecting to the VPN changes our IP address and this IP can be whitelisted in Cloudflare&#8217;s firewall. So only we have access to the WordPress login page URL. This step is not needed if you own a static IP from your ISP which is not always the case.</p>



<p>Wireguard is a new and lightweight VPN solution that can be easily deployed using a docker container. There is a wireguard docker container from <a href="https://fleet.linuxserver.io/image?name=linuxserver/wireguard" target="_blank" rel="noreferrer noopener">linuxserver.io</a> which can be easily deployed. </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Follow <a href="https://tekcookie.com" target="_blank" rel="noreferrer noopener">tekcookie.com</a> for upcoming VPN articles.</p></blockquote>



<p>The VPN can be configured as a split tunnel allowing only the website IP or a tunnel mode VPN tunneling the entire traffic. It&#8217;s better to use split-tunnel mode VPN as it does not take much of the network bandwidth.</p>



<p>For split-tunnel configuration, IPTables of the wireguard server has to be configured to allow only the website traffic</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -d tekcookie.com -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -d tekcookie.com -o eth0 -j MASQUERADE</code></pre>



<p>In the <strong>VPN Client</strong> software, the AllowedIPs parameter should have the public IP address of the website.</p>



<pre class="wp-block-code"><code lang="" class="">AllowedIPs = 132.123.13.123/32, 111.222.212.123/32</code></pre>



<p>If there is more than one IP to the website, it can be added as shown in the sample above. The IP address of the domain is obtained by nslookup to any DNS servers out on the internet.</p>



<p>By this, only the website traffic is tunneled through the VPN and other traffic takes the normal internet.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Cloudflare Firewall Rules</h3>



<p>In the Cloudflare firewall, a rule is added to block all the traffic to the login URL except the traffic having the VPN server&#8217;s IP as the source address.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" width="1024" height="552" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/firewallrule-secure-cloudflare.webp?resize=1024%2C552&#038;ssl=1" alt="" class="wp-image-4749" srcset="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/firewallrule-secure-cloudflare.webp?resize=1024%2C552&amp;ssl=1 1024w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/firewallrule-secure-cloudflare.webp?resize=300%2C162&amp;ssl=1 300w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/firewallrule-secure-cloudflare.webp?resize=768%2C414&amp;ssl=1 768w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/firewallrule-secure-cloudflare.webp?w=1069&amp;ssl=1 1069w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Navigate to Firewall &gt; Firewall Rules and click the &#8220;Create a Firewall rule&#8221; button to create a new rule.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p>In the rule, custom login page URL is added with the VPN server&#8217;s IP address.</p>



<figure class="wp-block-image size-large is-style-default"><img data-recalc-dims="1" decoding="async" width="1024" height="737" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/BlockRule-secure-cloudflare.webp?resize=1024%2C737&#038;ssl=1" alt="" class="wp-image-4750" srcset="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/BlockRule-secure-cloudflare.webp?resize=1024%2C737&amp;ssl=1 1024w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/BlockRule-secure-cloudflare.webp?resize=300%2C216&amp;ssl=1 300w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/BlockRule-secure-cloudflare.webp?resize=768%2C552&amp;ssl=1 768w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/09/BlockRule-secure-cloudflare.webp?w=1069&amp;ssl=1 1069w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p> This is a &#8220;Block&#8221; rule which blocks all the traffic to https://domainname.com/randomurl if the source IP address does not match the VPN server&#8217;s IP address.</p>



<p>Means, this page is only accessible if the VPN is connected.</p>



<p>Along with the IP address filtering, there are many more filters available such as Country, cookie, user agent, client certificate verified, etc. Just explore it out and frame your own rules for better security.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



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



<p>This article explains how to secure the WordPress login. But this does not guarantee the overall website security from internet threats. For that, a vulnerability assessment has to be performed to identify the loopholes. The WordPress and the plugins have to be kept updated to protect from the known security issues. There are also many WordPress plugins that help to increase website security.</p>



<p>The sad truth of security is nothing is 100% secure.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope you liked this article and thank you for reading.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/secure-website-login-using-cloudflare-and-vpn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3415</post-id>	</item>
		<item>
		<title>Free SSL Certificate for your Website</title>
		<link>https://tekcookie.com/free-ssl-certificate-for-your-website/</link>
					<comments>https://tekcookie.com/free-ssl-certificate-for-your-website/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Sat, 09 May 2020 21:56:26 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[FREE SSL certificate for your website]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=1214</guid>

					<description><![CDATA[SSL certificate in your website (the lock icon) proves the authenticity of your business or personal website. This also makes the website ready for the future as the browsers move towards blocking non-https websites. https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html Let’s Encrypt is one of the CA who provide free SSL certificate for the websites. The free certificate is having [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>SSL certificate in your website (the lock icon) proves the authenticity of your business or personal website. This also makes the website ready for the future as the browsers move towards blocking non-https websites. <a href="https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html" target="_blank" rel="noopener">https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html</a></p>



<p><strong><a rel="noreferrer noopener" href="https://letsencrypt.org/" target="_blank">Let’s Encrypt</a></strong> is one of the CA who provide free SSL certificate for the websites. The free certificate is having 90 days validity.</p>



<p>In this article, we will see how to get <strong>FREE SSL certificate</strong> for the website.</p>



<p>In the previous post, we saw how to publish WordPress website in Ubuntu Linux. Using the free SSL, we will secure the website.</p>



<figure class="wp-block-embed is-type-wp-embed is-provider-tekcookie wp-block-embed-tekcookie"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="MtDNZ1qPtc"><a href="https://tekcookie.com/install-wordpress-on-ubuntu/">Install WordPress on Ubuntu</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install WordPress on Ubuntu&#8221; &#8212; TekCookie" src="https://tekcookie.com/install-wordpress-on-ubuntu/embed/#?secret=MtDNZ1qPtc" data-secret="MtDNZ1qPtc" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<h2 class="wp-block-heading">Step-1 : Setting Domain Name</h2>



<p>To setup SSL for the website, the site need to have a domain name with A record pointing to the website IP address. The domain here is moneyworkforme.in and the dns is having A record pointing to wesite IP address and www as cname record referring to the domain name.</p>



<p>The DNS setting can be changed in the doman registrar website or in the third party DNS provider console if custom name server is configured.</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/domain-dns-setting-1.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-1218"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-2 : Setup WordPress URL</h2>



<p>Browser and login to the WordPress website admin portal. http://&lt;ip-address&gt;/wp-admin</p>



<p>Change the WordPress Address URL and Site Address URL to the domain name &#8211; www.moneyworkforme.in</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-rename-site-address.jpg?resize=786%2C535&#038;ssl=1" alt="" class="wp-image-1225" width="786" height="535"/></figure>



<p>After the settings are saved, the browser refresh to the wp-admin page with the domain name as suffix instead of the IP address.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-login-page-with-domain-name-1.jpg?resize=780%2C494&#038;ssl=1" alt="" class="wp-image-1227" width="780" height="494"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-3 : Installing Certbot</h2>



<p>We need to install certbot package to get certificate from the CA and python3-certbot-apache plugin which integrates Certbot with Apache to automate certificate renewal and https configuration in the web server.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install certbot 
sudo apt install python3-certbot-apache</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-4 : Apache Virtual Host Configuration</h2>



<p>To obtain SSL certificate for the web server, Certbot needs to find the website domain name and the alias name within the Apache configuration files. This information will be retrieved from the ServerName and ServerAlias fields defined in the configuration file.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo nano /etc/apache2/sites-available/000-default.conf</code></pre>



<p>In the configuration file, add the following entries &#8211;</p>



<pre class="wp-block-preformatted">ServerName moneyworkforme.in
ServerAlias www.moneyworkforme.in</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ubuntu-apache2-config-hostname.jpg?resize=753%2C167&#038;ssl=1" alt="" class="wp-image-1222" width="753" height="167"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-5 : Allow HTTPS Port</h2>



<p>Enable the tcp port 443 to accept https traffic</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT</code></pre>



<p>Make the firewall changes permanent</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo netfilter-persistent save</code></pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i1.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/ubuntu-firewall-changes.jpg?fit=640%2C56&amp;ssl=1" alt="" class="wp-image-1220" width="754" height="66"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-6 : Install Let&#8217;s Encrypt Certificate</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo certbot --apache --agree-tos --email info@tekcookie.com --redirect -d moneyworkforme.in -d www.moneyworkforme.in</code></pre>



<pre class="wp-block-preformatted">Parameters:
–apache: Use Apache2 Let’s Encrypt installer.
–agree-tos: Agree to Let’s Encrypt terms of service.
–redirect: Adds 301 redirect.
–email: Contact email address.
–d: add the domain name and alias name.</pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i2.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/installed-ssl.jpg?fit=640%2C453&amp;ssl=1" alt="" class="wp-image-1223" width="764" height="541"/></figure>



<p>The &#8220;IMPORTANT NOTES&#8221; section shows the path where the certificate is downloaded.</p>



<p>Lets verify the same, list the items under /etc/letsencrypt/live/moneyworkforme.in to view the certificate files.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ssl-path.jpg?resize=765%2C37&#038;ssl=1" alt="" class="wp-image-1224" width="765" height="37"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-7 : Setup Certificate Auto-Renewal</h2>



<p>Automating the certificate makes the administration job easier as the certificate validity is only 90 days. Test the status of Certbot before adding the same to crontab</p>



<p>Check the status of the Certbot</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl status certbot.timer</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/certbot-status.jpg?resize=729%2C133&#038;ssl=1" alt="" class="wp-image-1228" width="729" height="133"/></figure>



<p>Testing the renewal process by dry run with certbot</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo certbot renew --dry-run</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/certbot-renewal.jpg?resize=724%2C647&#038;ssl=1" alt="" class="wp-image-1229" width="724" height="647"/></figure>



<p>Configuring Crontab for scheduling certificate auto renewal.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo crontab -e</code></pre>



<p>Select the appropriate text editor when prompted and add the below statement.</p>



<pre class="wp-block-preformatted">0 1 * * * /usr/bin/certbot renew &amp; &gt; /dev/null</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/cron-job.jpg?resize=540%2C188&#038;ssl=1" alt="" width="540" height="188"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-8 : Fix HTTPS Redirection</h2>



<p>When the SSL certificate is installed, the Certbot auto configures Apache2 with http to https redirection. But the auto configured redirection only works with URL having domain name (I.e http://moneyworkforme.in to https://moneyworkforme.in) but not for the IP address. To redirect http traffic with IP address in the URL to domain name, modify Apache Virtual Host Configuration.</p>



<p>Replace the following snippet as shown below under VirtualHost tag</p>



<p><em>Auto configured settings</em></p>



<pre class="wp-block-preformatted">RewriteEngine on
RewriteCond %{SERVER_NAME} =www.moneyworkforme.in [OR]
RewriteCond %{SERVER_NAME} =moneyworkforme.in
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]</pre>



<p>Replace the above with</p>



<pre class="wp-block-preformatted">RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://www.moneyworkforme.in/$1 [R,L]</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/http-https-rewrite.jpg?resize=561%2C103&#038;ssl=1" alt="" class="wp-image-1230" width="561" height="103"/></figure>



<p>And the WordPress site is now secured with Let&#8217;s Encrypt SSL Certificate.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/final-site-ssl.jpg?resize=715%2C632&#038;ssl=1" alt="" width="715" height="632"/></figure>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope this article is informative to you. Thank you for reading my post.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/free-ssl-certificate-for-your-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1214</post-id>	</item>
		<item>
		<title>Install WordPress on Ubuntu</title>
		<link>https://tekcookie.com/install-wordpress-on-ubuntu/</link>
					<comments>https://tekcookie.com/install-wordpress-on-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Fri, 08 May 2020 06:20:27 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Install WordPress on Ubuntu]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=925</guid>

					<description><![CDATA[There are many cloud hosting providers out there who publish WordPress website and most of them charges around $3 &#8211; $4 or more per month. Stay tuned for the upcoming post where I will show you how to host WordPress for FREE !!! This article describes about how to install WordPress on Ubuntu. WordPress is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>There are many cloud hosting providers out there who publish WordPress website and most of them charges around $3 &#8211; $4 or more per month. Stay tuned for the upcoming post where I will show you how to host WordPress for FREE !!!</p>



<p>This article describes about how to install WordPress on Ubuntu.</p>



<p>WordPress is a Free and Open-Source content management system developed in php with MySQL as back-end with the capability to extent or implement functionality by using plugins and UI modifications via Themes.</p>



<p>Here, we will Install WordPress in a very small Instance of Linux VM. The installation is done through shell.</p>



<pre class="wp-block-preformatted"><strong><span style="text-decoration: underline;">System Specs:</span></strong>
Processor - 1 vCPU
Memory - 1 Gb
OS Version - Ubuntu 20.04</pre>



<p>Note: This is not an ideal specs for installing WordPress, but works fine for blogs and personal websites.</p>



<p>After the installation of Ubuntu, update and upgrade the OS</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt-get update &amp;&amp; sudo apt-get upgrade -y</code></pre>



<p>Once the operating system is updated, follow below steps for installing WordPress</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-1 : Install Apache Web Server</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install apache2 -y</code></pre>



<p>Once the installation is completed, check the apache service status</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">systemctl status apache2</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/Apache_Status.jpg?resize=636%2C236&#038;ssl=1" alt="" class="wp-image-1157" width="636" height="236"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-2 : Enable Firewall settings to allow http traffic</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT</code></pre>



<p>To make the changes permanent even after server restart, run the following command</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo netfilter-persistent save</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" src="https://i1.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/fireweallRule.jpg?fit=640%2C56&amp;ssl=1" alt="" class="wp-image-1159"/></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Test the above by typing the server ip address in the web browser, we will be able to see the apache default page in the web browser.</p></blockquote>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ApacheDefPage.jpg?resize=647%2C474&#038;ssl=1" alt="" class="wp-image-1160" width="647" height="474"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-3 : Install php package</h2>



<p>Run below command to install the latest version of php and associated package</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php php-ldap php-zip php-curl -y</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-4 : Test php Installation</h2>



<p>Create a test php file and browse the page in web browser</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo vi /var/www/html/testpage.php</code></pre>



<p>in the <strong>nano </strong>editor, add below snippet and save</p>



<pre class="wp-block-preformatted">&lt;?php
echo "The website is working !!!";
?&gt;</pre>



<p>Open web browser and browse http://&lt;ip-address&gt;/testpage.php</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/php_page_test-1.jpg?resize=631%2C191&#038;ssl=1" alt="" class="wp-image-1163" width="631" height="191"/></figure>



<h2 class="wp-block-heading">Step-5 : Install Database &#8211; MariaDB</h2>



<p>Execute the below command to install Maria DB</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install mariadb-server -y</code></pre>



<p>Note: This installation will take some time to finish.</p>



<p>Once the installation is completed, execute below command to do the initial config.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mysql_secure_installation</code></pre>



<p>The shell will prompt for input when the above command is executed. Follow the input given in the screenshot to complete the setup.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/MariaDB_Config-1.jpg?resize=587%2C983&#038;ssl=1" alt="" width="587" height="983"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-6 : Configure Database</h2>



<p>Login to mysql as root and create the database for wordpress</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mysql -u root</code></pre>



<p>Create database and assign permission using below snippet</p>



<pre class="wp-block-preformatted">CREATE DATABASE wordpress;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit</pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i2.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/DB-Config.jpg?fit=640%2C195&amp;ssl=1" alt="" class="wp-image-1167" width="821" height="250"/><figcaption>DB Creation and DB Permission</figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-7 : Download and Install WordPress</h2>



<p>Navigate to home directory and download WordPress package</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd /home/ubuntu
wget https://wordpress.org/latest.tar.gz</code></pre>



<p>Extract the package and copy to the root web folder</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">tar xf latest.tar.gz
sudo mv wordpress/ /var/www/html/</code></pre>



<p>Modify WordPress folder permission and ownership</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo chown -R www-data:www-data /var/www/html/wordpress/
sudo chmod 755 -R /var/www/html/wordpress/</code></pre>



<p>Create Upload folder and change ownership</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mkdir /var/www/html/wordpress/wp-content/uploads
sudo chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-8 : Make WordPress folder as default web path</h2>



<p>Edit apache config file and add the following config details under the tag &lt;VirtualHost *:80&gt;</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo vi /etc/apache2/sites-available/000-default.conf</code></pre>



<pre class="wp-block-preformatted">&lt;VirtualHost *:80&gt;
   DocumentRoot /var/www/html/wordpress
   <code>&lt;Directory /var/www/html/wordpress/&gt; </code>
      <code>Options FollowSymLinks </code>
      <code>AllowOverride Limit Options FileInfo </code>
      <code>DirectoryIndex index.php </code>
      <code>Order allow,deny </code>
      <code>Allow from all </code>
   <code>&lt;/Directory&gt; </code>
   <code>&lt;Directory /var/www/html/wordpress/wp-content&gt; </code>
      <code>Options FollowSymLinks </code>
      <code>Order allow,deny </code>
      <code>Allow from all </code>
   <code>&lt;/Directory&gt;</code>
&lt;/VirtualHost&gt;</pre>



<p>Restart apache service</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl restart apache2</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-9 : Final Settings in Linux</h2>



<p>Enable url rewrite feature and restart apache</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo a2enmod rewrite
sudo systemctl restart apache2</code></pre>



<p>Finally, the linux side configuration is completed.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



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



<p>Let&#8217;s go to web browser to configure the rest in WordPress. Open web browser and browse the server IP address</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_1.png?resize=600%2C539&#038;ssl=1" alt="" class="wp-image-1177" width="600" height="539"/></figure>



<p>Select language and click on Continue</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_2-1.jpg?resize=601%2C453&#038;ssl=1" alt="" width="601" height="453"/></figure>



<p>Click on &#8220;Let&#8217;s go!&#8221; button to configure the database details to complete WordPress configuration</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_3-1.jpg?resize=595%2C420&#038;ssl=1" alt="" class="wp-image-1180" width="595" height="420"/></figure>



<p>Enter the database details as per we have configured in<strong> Step-6</strong></p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_4.jpg?resize=599%2C209&#038;ssl=1" alt="" width="599" height="209"/></figure>



<p>WordPress will proceed to the above page if the DB information entered is correct. Click on &#8220;Run the installation&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_5.jpg?resize=596%2C669&#038;ssl=1" alt="" class="wp-image-1183" width="596" height="669"/></figure>



<p>Enter the required login information in WordPress and click &#8220;Install WordPress&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_6.jpg?resize=596%2C332&#038;ssl=1" alt="" class="wp-image-1184" width="596" height="332"/></figure>



<p>Finally, the installation is completed and WordPress website is ready !!!</p>



<p>To view the website, navigate to http://&lt;ip-address&gt;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_9.jpg?resize=590%2C403&#038;ssl=1" alt="" class="wp-image-1185" width="590" height="403"/></figure>



<p>To view website admin portal, navigate to http://&lt;ip-address&gt;/wp-admin</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_7.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-1186"/></figure>



<p>Enter the login credential which was set during the installation process and click on &#8220;Log In&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_8.jpg?resize=592%2C402&#038;ssl=1" alt="" width="592" height="402"/></figure>



<p>Now, its all your. This completes the installation of WordPress in Ubuntu.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Testing the site performance</h2>



<p>Browse to url &#8220;<a href="https://developers.google.com/speed/pagespeed/insights/" target="_blank" rel="noopener">https://developers.google.com/speed/pagespeed/insights/</a>&#8221; and paste the website url. Click on &#8220;Analyze&#8221; button to get the results</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-test-2-2.jpg?resize=602%2C713&#038;ssl=1" alt="" width="602" height="713"/></figure>



<p>The results are excellent, but this is just a plain website. Once we add more contents, plugins and themes. The analysis rating may go down.</p>



<p>After all, its just 1 CPU and 1GB RAM. Good for blogging and personal websites. As your traffic increases, you can find alternatives which gives more processing power.</p>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope you liked the article. Thank you for reading.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/install-wordpress-on-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">925</post-id>	</item>
		<item>
		<title>Forcefully delete plugins from WordPress Site</title>
		<link>https://tekcookie.com/delete-plugins-from-wordpress/</link>
					<comments>https://tekcookie.com/delete-plugins-from-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Sat, 11 Apr 2020 13:27:39 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[delete plugins from WordPress]]></category>
		<category><![CDATA[delete wordpress plugins]]></category>
		<category><![CDATA[Forcefully delete plugins from WordPress]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=654</guid>

					<description><![CDATA[Unable to remove a plugin in WordPress site? Issue: Unable to remove a plugin from the WordPress Admin Portal. Please follow below steps to delete the plugins from WordPress. Hosting Details: ---------------- Environment: Bitnami WordPress Hosting: Google Cloud Platform Step &#8211; 1 Login to google cloud platform console and navigate to compute engine and click [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p></p>



<h2 class="wp-block-heading">Unable to remove a plugin in WordPress site?</h2>



<p></p>



<h3 class="wp-block-heading">Issue: Unable to remove a plugin from the WordPress Admin Portal.</h3>



<p>Please follow below steps to delete the plugins from WordPress.</p>



<pre class="wp-block-preformatted">    Hosting Details:
    ----------------
    Environment: Bitnami WordPress
    Hosting: Google Cloud Platform</pre>



<p><strong>Step &#8211; 1</strong></p>



<p>Login to google cloud platform console and navigate to compute engine and click on VM Instance</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/1-1.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-660"/><figcaption>Navigate to the VM instance as shown in the red box 1 &gt;&gt; 2 &gt;&gt; 3</figcaption></figure>



<p></p>



<p><strong>Step &#8211; 2</strong></p>



<p>Click on SSH to connect to the Virtual Machine console</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/2-2.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-666"/></figure>



<p></p>



<p>A new browser window opens with SSH shell to the Linux virtual machine</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/3.jpg?resize=541%2C309&#038;ssl=1" alt="" class="wp-image-662" width="541" height="309"/></figure>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/4.jpg?resize=539%2C297&#038;ssl=1" alt="" class="wp-image-663" width="539" height="297"/><figcaption>Clear the console</figcaption></figure>



<p><strong>Step &#8211; 4</strong></p>



<p>Navigate to the WordPress folder path </p>



<pre class="wp-block-preformatted">cd /var/www/html/wp-content/plugins</pre>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/image.png?w=1080&#038;ssl=1" alt="" class="wp-image-659"/></figure>



<p><strong>Step &#8211; 5</strong></p>



<p>List all the items inside the plugin folder</p>



<pre class="wp-block-preformatted">ls -al</pre>



<p>Delete the folder with the name of the plugin</p>



<pre class="wp-block-preformatted">sudo rm wp-optimize -r -f</pre>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/6.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-664"/></figure>



<p>Once the folder is deleted, exit from the console window</p>



<p>Now go back to the WordPress web console. Log off and Log in back again.</p>



<p>Navigate to plugins option. The plugin is gone.</p>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Thank you for reading my post. Hope this is helpful to you.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/delete-plugins-from-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">654</post-id>	</item>
	</channel>
</rss>
