<?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>Web Development Archives - george mastro</title>
	<atom:link href="https://georgemastro.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://georgemastro.com/category/web-development/</link>
	<description>web developer, photographer, filmmaker</description>
	<lastBuildDate>Sat, 25 Oct 2025 20:41:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://georgemastro.com/wp-content/uploads/2016/02/cropped-mastro-avatar-square-32x32.jpg</url>
	<title>Web Development Archives - george mastro</title>
	<link>https://georgemastro.com/category/web-development/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to install AMP on your WordPress site</title>
		<link>https://georgemastro.com/install-amp-wordpress-site/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Sun, 11 Feb 2018 20:09:58 +0000</pubDate>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://georgemastro.com/?p=268</guid>

					<description><![CDATA[<p>AMP stands for Accelerated Mobile Pages Project and you can read more about it here https://www.ampproject.org Installing it on your site is quite straightforward, although not very easy. The best plugin of all IMHO is &#8220;AMP for WP&#8221; and you can find it here https://wordpress.org/plugins/accelerated-mobile-pages/ After installing it, you must activate it and follow these steps: Press Start [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/install-amp-wordpress-site/">How to install AMP on your WordPress site</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>AMP stands for Accelerated Mobile Pages Project and you can read more about it here <a href="https://www.ampproject.org">https://www.ampproject.org</a></p>
<p>Installing it on your site is quite straightforward, although not very easy. The best plugin of all IMHO is &#8220;AMP for WP&#8221; and you can find it here <a href="https://wordpress.org/plugins/accelerated-mobile-pages/">https://wordpress.org/plugins/accelerated-mobile-pages/</a></p>
<p>After installing it, you must activate it and follow these steps:</p>
<p>Press Start</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.16.jpg"><img fetchpriority="high" decoding="async" class="size-full wp-image-270 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.16.jpg" alt="" width="884" height="689" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.16.jpg 884w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.16-300x234.jpg 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.16-768x599.jpg 768w" sizes="(max-width: 884px) 100vw, 884px" /></a></p>
<p>Then choose your logo</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.38.jpg"><img decoding="async" class="size-full wp-image-271 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.38.jpg" alt="" width="797" height="619" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.38.jpg 797w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.38-300x233.jpg 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.09.38-768x596.jpg 768w" sizes="(max-width: 797px) 100vw, 797px" /></a></p>
<p>Select the pages that you want AMP to be enabled. I suggest selecting pages that don&#8217;t have any special or weird mechanisms that rely heavily on JavaScript.</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.10.10.jpg"><img decoding="async" class="size-full wp-image-272 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.10.10.jpg" alt="" width="758" height="620" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.10.10.jpg 758w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.10.10-300x245.jpg 300w" sizes="(max-width: 758px) 100vw, 758px" /></a></p>
<p>Then set your Google Analytics Tracking code<br />
<a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.11.56.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-273 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.11.56.jpg" alt="" width="766" height="645" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.11.56.jpg 766w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.11.56-300x253.jpg 300w" sizes="auto, (max-width: 766px) 100vw, 766px" /></a></p>
<p>Select your desired style from the 3 pre-installed</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.12.52.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-274 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.12.52.jpg" alt="" width="796" height="687" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.12.52.jpg 796w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.12.52-300x259.jpg 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.12.52-768x663.jpg 768w" sizes="auto, (max-width: 796px) 100vw, 796px" /></a></p>
<p>And you&#8217;re all set!</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.13.02.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-275 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.13.02.jpg" alt="" width="755" height="609" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.13.02.jpg 755w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-06-12.13.02-300x242.jpg 300w" sizes="auto, (max-width: 755px) 100vw, 755px" /></a></p>
<p>There are some more thing you can do to refine some settings. Head on to the preferences of the plugin here</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-9.39.46-PM.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-277 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-9.39.46-PM.jpg" alt="" width="1022" height="608" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-9.39.46-PM.jpg 1022w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-9.39.46-PM-300x178.jpg 300w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-9.39.46-PM-768x457.jpg 768w" sizes="auto, (max-width: 1022px) 100vw, 1022px" /></a></p>
<p>On General-&gt;Settings page you can change the pages where you want AMP to be enabled. In my case, I only want it for my blog, so this is how it looks like:</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59.png"><img loading="lazy" decoding="async" class="size-large wp-image-278 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59-1024x667.png" alt="" width="560" height="365" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59-1024x667.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59-300x195.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59-768x500.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59-1200x782.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.47.59.png 1486w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>I suggest turning on &#8220;Meta Tags from Yoast&#8221;</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57.png"><img loading="lazy" decoding="async" class="size-large wp-image-279 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57-1024x470.png" alt="" width="560" height="257" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57-1024x470.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57-300x138.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57-768x353.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57-1200x551.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.48.57.png 1254w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Turn on &#8220;Minify AMP Page&#8221;</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13.png"><img loading="lazy" decoding="async" class="size-large wp-image-280 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13-1024x555.png" alt="" width="560" height="304" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13-1024x555.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13-300x163.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13-768x417.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13-1200x651.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.50.13.png 1346w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Make sure you have Structured data enabled for posts and pages</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20.png"><img loading="lazy" decoding="async" class="size-large wp-image-281 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20-1024x523.png" alt="" width="560" height="286" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20-1024x523.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20-300x153.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20-768x392.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20-1200x613.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.52.20.png 1594w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>You can also enable Facebook&#8217;s Instant Articles. Just be sure to Re-Save permalink when you enable this option.</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53.png"><img loading="lazy" decoding="async" class="size-large wp-image-282 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-1024x406.png" alt="" width="560" height="222" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-1024x406.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-300x119.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-768x304.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-1200x475.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.53.53-1860x737.png 1860w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Turn on &#8220;Mobile Redirection&#8221;</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06.png"><img loading="lazy" decoding="async" class="size-large wp-image-283 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06-1024x475.png" alt="" width="560" height="260" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06-1024x475.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06-300x139.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06-768x356.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06-1200x556.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.55.06.png 1640w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>On Design-&gt;Global page, choose your favorite color palette and add any CSS needed for typography that doesn&#8217;t match your main theme</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01.png"><img loading="lazy" decoding="async" class="size-large wp-image-284 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-1024x588.png" alt="" width="560" height="322" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-1024x588.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-300x172.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-768x441.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-1200x689.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01-1860x1067.png 1860w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.56.01.png 2004w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Add Navigation on your AMP pages</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16.png"><img loading="lazy" decoding="async" class="size-large wp-image-285 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16-1024x525.png" alt="" width="560" height="287" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16-1024x525.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16-300x154.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16-768x394.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16-1200x616.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.57.16.png 1746w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Then go to your WordPress Appearance-&gt;Menus and add your preferred menu to your AMP theme</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37.png"><img loading="lazy" decoding="async" class="size-large wp-image-286 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-1024x660.png" alt="" width="560" height="361" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-1024x660.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-300x193.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-768x495.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-1200x774.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37-1860x1199.png 1860w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-21.59.37.png 1886w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>As a last step go here https://search.google.com/test/amp and check if one of your pages can be read correctly from Google. If so, it should look like this</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14.png"><img loading="lazy" decoding="async" class="size-large wp-image-287 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-1024x627.png" alt="" width="560" height="343" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-1024x627.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-300x184.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-768x470.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-1200x734.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Screenshot-2018-02-11-22.02.14-1860x1138.png 1860w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>Hit &#8220;SUBMIT TO GOOGLE&#8221; in order to be processed from your Google Console faster. After about 24-48 hours, your search results should show the familiar AMP lightning icon</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM.jpg"><img loading="lazy" decoding="async" class="size-large wp-image-288 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-1024x461.jpg" alt="" width="560" height="252" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-1024x461.jpg 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-300x135.jpg 300w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-768x346.jpg 768w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-1200x540.jpg 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-11-at-10.04.20-PM-1860x837.jpg 1860w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p>That&#8217;s it!</p>
<p>If you found this article useful, don&#8217;t forget to check my channels:<br />
Insta: <a href="https://www.instagram.com/georgemastro/">georgemastro</a><br />
500px: <a href="https://500px.com/georgemastro">georgemastro</a><br />
Twitter: <a href="https://twitter.com/george_mastro">george_mastro</a></p>
<p>or contact me here <a href="https://georgemastro.com/contact/">https://georgemastro.com/contact/</a></p>
<p>The post <a href="https://georgemastro.com/install-amp-wordpress-site/">How to install AMP on your WordPress site</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to build a minimal photography website</title>
		<link>https://georgemastro.com/build-free-minimal-photography-website/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Sat, 03 Feb 2018 00:11:17 +0000</pubDate>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Web Development]]></category>
		<guid isPermaLink="false">https://georgemastro.com/?p=206</guid>

					<description><![CDATA[<p>I&#8217;ll be honest. I was searching for the perfect minimal theme for my photography portfolio over two years. Yes! TWO YEARS. I couldn&#8217;t find the perfect photography theme/platform until I saw this post https://colormelon.com/free-portfolio-website-tutorial/ It is a clean minimal WordPress theme and it is absolutely free! What else can you ask? WordPress is pretty easy to [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/build-free-minimal-photography-website/">How to build a minimal photography website</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ll be honest. I was searching for the perfect minimal theme for my photography portfolio over two years. Yes! TWO YEARS.</p>
<p>I couldn&#8217;t find the perfect photography theme/platform until I saw this post <a href="https://colormelon.com/free-portfolio-website-tutorial/">https://colormelon.com/free-portfolio-website-tutorial/</a></p>
<blockquote><p><strong>It is a clean minimal WordPress theme and it is absolutely free!</strong></p></blockquote>
<p>What else can you ask? WordPress is pretty easy to handle, and the theme comes with everything I needed.</p>
<ul>
<li>Minimal aesthetics</li>
<li>Focus on content</li>
<li>Fast and light</li>
<li>Nice looking gallery</li>
<li>Pleasent blog</li>
<li>As clean as it gets</li>
</ul>
<p><a href="https://georgemastro.com/contact/">Contact me</a> if you need any help installing it. You could use a developer&#8217;s/photographer&#8217;s perspective 😉</p>
<h3>Extra tip!</h3>
<p>The above guide will get you a near perfect site. But if you want to spice it up a bit, be sure to make it SEO friendly and fast. After a few tweaks I managed to get 98/100 on Google Pagespeed Insights.</p>
<p><a href="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM.png"><img loading="lazy" decoding="async" class="size-large wp-image-214 aligncenter" src="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-1024x430.png" alt="Google Pagespeed Insights" width="560" height="235" srcset="https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-1024x430.png 1024w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-300x126.png 300w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-768x322.png 768w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-1200x504.png 1200w, https://georgemastro.com/wp-content/uploads/2018/02/Image-2018-02-03-at-6.02.54-PM-1860x781.png 1860w" sizes="auto, (max-width: 560px) 100vw, 560px" /></a></p>
<p><strong>IMPORTANT!</strong> Don&#8217;t forget to take care of the security, as WordPress is not very famous for it 😉</p>
<p>The post <a href="https://georgemastro.com/build-free-minimal-photography-website/">How to build a minimal photography website</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Drupal ckeditor IMCE upload button missing</title>
		<link>https://georgemastro.com/drupal-ckeditor-imce-upload-button-missing/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Wed, 08 Oct 2014 15:29:46 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ckeditor]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[imce]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=54</guid>

					<description><![CDATA[<p>Many custom themes conflict with the javascript from IMCE and the upload button doesn&#8217;t appear. Download themekey module from d.o. (https://www.drupal.org/project/themekey) and enable it. Then build a rule to use the admin theme on &#8220;imce&#8221; path like this: drupal:path = imce -&#62; Seven or in my case Shiny</p>
<p>The post <a href="https://georgemastro.com/drupal-ckeditor-imce-upload-button-missing/">Drupal ckeditor IMCE upload button missing</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20.png" rel="attachment wp-att-56"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-56" src="http://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20-1024x318.png" alt="Screenshot-2014-10-08-13-19-20" width="840" height="261" srcset="https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20-1024x318.png 1024w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20-300x93.png 300w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20-768x239.png 768w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20-1200x373.png 1200w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-19-20.png 1539w" sizes="auto, (max-width: 840px) 100vw, 840px" /></a></p>
<p>Many custom themes conflict with the javascript from IMCE and the upload button doesn&#8217;t appear.<span id="more-54"></span></p>
<p>Download themekey module from d.o. (https://www.drupal.org/project/themekey) and enable it.</p>
<p>Then build a rule to use the admin theme on &#8220;imce&#8221; path like this:</p>
<p><code>drupal:path = imce</code> -&gt; Seven or in my case Shiny</p>
<p><a href="http://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-17-16.png" rel="attachment wp-att-55"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-55" src="http://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-17-16-300x26.png" alt="Screenshot-2014-10-08-13-17-16" width="300" height="26" srcset="https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-17-16-300x26.png 300w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-17-16-768x67.png 768w, https://georgemastro.com/wp-content/uploads/2016/02/Screenshot-2014-10-08-13-17-16.png 1003w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The post <a href="https://georgemastro.com/drupal-ckeditor-imce-upload-button-missing/">Drupal ckeditor IMCE upload button missing</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Warnings on running phpcs -i for SublimeLinter</title>
		<link>https://georgemastro.com/warnings-on-running-phpcs-i-for-sublimelinter/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Thu, 17 Jul 2014 15:25:41 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php linter]]></category>
		<category><![CDATA[phpcs]]></category>
		<category><![CDATA[sublime text]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=48</guid>

					<description><![CDATA[<p>Warning: include_once(PHP/CodeSniffer/CLI.php): failed to open stream: No such file or directory in /usr/bin/phpcs on line 31 Warning: include_once(): Failed opening &#8216;PHP/CodeSniffer/CLI.php&#8217; for inclusion (include_path=&#8217;.:&#8217;) in /usr/bin/phpcs on line 31 Fatal error: Class &#8216;PHP_CodeSniffer_CLI&#8217; not found in /usr/bin/phpcs on line 34 If you are seeing the above errors when running phpcs (PHPCodeSniffer) first thing you have [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/warnings-on-running-phpcs-i-for-sublimelinter/">Warnings on running phpcs -i for SublimeLinter</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><code>Warning: include_once(PHP/CodeSniffer/CLI.php): failed to open stream: No such file or directory in /usr/bin/phpcs on line 31</code></p>
<p>Warning: include_once(): Failed opening &#8216;PHP/CodeSniffer/CLI.php&#8217; for inclusion (include_path=&#8217;.:&#8217;) in /usr/bin/phpcs on line 31<span id="more-48"></span></p>
<p>Fatal error: Class &#8216;PHP_CodeSniffer_CLI&#8217; not found in /usr/bin/phpcs on line 34<br />
If you are seeing the above errors when running phpcs (PHPCodeSniffer) first thing you have to do is to make sure you have PHPCodeSniffer installed. To check this just open a Terminal and run:<br />
<code><br />
find / -type f -name 'CLI.php'</code></p>
<p>If you see in the results something like this &#8230;..lib/php/PHP/CodeSniffer/CLI.php then you have code sniffer installed. In case you haven&#8217;t then run <code>sudo pear install PHP_CodeSniffer</code> to install it.</p>
<p>Then all you have to do is to include the folder in your path. Just copy in your clipboard everyhing behind /PHP/CodeSniffer/CLI.php. In my case it was &#8220;/Applications/MAMP/bin/php/php5.4.26/lib/php&#8221; and paste it in your bash profile file which usually is ~/.bash_profile</p>
<p>So just type <code>nano ~/.bash_profile</code> and paste in there something like this:</p>
<p><code>export PATH=/Applications/MAMP/bin/php/php5.4.26/lib/php:$PATH</code></p>
<p>The post <a href="https://georgemastro.com/warnings-on-running-phpcs-i-for-sublimelinter/">Warnings on running phpcs -i for SublimeLinter</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>gcc-4.8: error: unrecognized command line option &#8216;-fnested-functions&#8217;</title>
		<link>https://georgemastro.com/gcc-4-8-error-unrecognized-command-line-option-fnested-functions/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Wed, 18 Jun 2014 15:17:46 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[sublime text]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=40</guid>

					<description><![CDATA[<p>Tried to install phplinter by running the command brew install homebrew/php/phplint for sublime text and this error came up: gcc-4.8: error: unrecognized command line option &#8216;-fnested-functions&#8216; If you also have this problem please try and run first: brew upgrade brew update Then install command line tools again: xcode-select --install If the above fails install it [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/gcc-4-8-error-unrecognized-command-line-option-fnested-functions/">gcc-4.8: error: unrecognized command line option &#8216;-fnested-functions&#8217;</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Tried to install phplinter by running the command brew install homebrew/php/phplint for sublime text and this error came up:<br />
<strong>gcc-4.8: error: unrecognized command line option &#8216;-fnested-functions</strong>&#8216;<span id="more-40"></span></p>
<p>If you also have this problem please try and run first:</p>
<p><code>brew upgrade<br />
brew update</code><br />
Then install command line tools again:<br />
<code>xcode-select --install</code></p>
<p>If the above fails install it from here: https://developer.apple.com/downloads</p>
<p>Quit all terminal windows, if any and then open a new one.</p>
<p>Now run again<br />
<code>brew install homebrew/php/phplint</code></p>
<p>As of 2014-06-19 when the above reproduces the error you have to tap gcc, so write:<br />
<code>brew install gcc</code></p>
<p>If your are still experiencing problems, be sure to check brew doctor for solutions.</p>
<blockquote><p>EDIT: user &#8216;droob&#8217; gave a final solution on github!</p></blockquote>
<p>Just type brew install apple-gcc42 and then try to install phplint again.<br />
If this doesn&#8217;t work again try installing with this command:<br />
brew install phplint -cc=apple-gcc42 as user &#8216;Daisuke Nakai&#8217; commented here.</p>
<p>The post <a href="https://georgemastro.com/gcc-4-8-error-unrecognized-command-line-option-fnested-functions/">gcc-4.8: error: unrecognized command line option &#8216;-fnested-functions&#8217;</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Replace text in all files in a project &#8211; Linux</title>
		<link>https://georgemastro.com/replace-text-in-all-files-in-a-project-linux/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Wed, 18 Jun 2014 15:16:51 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=38</guid>

					<description><![CDATA[<p>Just run this: grep --include={*.php,*.html,*.htm} -rnl './' -e "text" &#124; xargs -i@ sed -i 's/text/new text/g' @ replacing the extensions you want to be included.</p>
<p>The post <a href="https://georgemastro.com/replace-text-in-all-files-in-a-project-linux/">Replace text in all files in a project &#8211; Linux</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Just run this:</p>
<p><code>grep --include={*.php,*.html,*.htm} -rnl './' -e "text" | xargs -i@ sed -i 's/text/new text/g' @</code><br />
replacing the extensions you want to be included.</p>
<p>The post <a href="https://georgemastro.com/replace-text-in-all-files-in-a-project-linux/">Replace text in all files in a project &#8211; Linux</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Recovering admin password in drupal 7 from phpmyadmin</title>
		<link>https://georgemastro.com/recovering-admin-password-in-drupal-7-from-phpmyadmin/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Fri, 30 May 2014 15:00:56 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[sql]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=30</guid>

					<description><![CDATA[<p>Just head in phpmyadmin and find the table &#8216;users&#8217;. Then find user 1 and change the password with the value &#8216;$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x&#8217; which is the encrypted value for the password &#8216;drupal&#8217;. Want to do it from shell? No problem. Just type: UPDATE users SET name='admin', pass='$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x' WHERE uid = 1; Do you still have Drupal 6? [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/recovering-admin-password-in-drupal-7-from-phpmyadmin/">Recovering admin password in drupal 7 from phpmyadmin</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Just head in phpmyadmin and find the table &#8216;users&#8217;. Then find user 1 and change the password with the value &#8216;$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x&#8217; which is the encrypted value for the password &#8216;drupal&#8217;.</p>
<p>Want to do it from shell? No problem. Just type:<br />
<code>UPDATE users SET name='admin', pass='$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x' WHERE uid = 1;</code></p>
<p>Do you still have Drupal 6? OMG! Are you serious? You have to update immediately! But to update your system just type:<br />
<code>UPDATE users SET name='admin', pass=md5('drupal') WHERE uid = 1;</code><br />
&#8230;in order to revoke your password.</p>
<p>The post <a href="https://georgemastro.com/recovering-admin-password-in-drupal-7-from-phpmyadmin/">Recovering admin password in drupal 7 from phpmyadmin</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>bundle install &gt;&gt; Could not locate Gemfile</title>
		<link>https://georgemastro.com/bundle-install-could-not-locate-gemfile/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Fri, 30 May 2014 14:55:14 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[drush]]></category>
		<category><![CDATA[sass]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=25</guid>

					<description><![CDATA[<p>Running drush omega-guard Solution: You just have to go to the proper theme folder and run first: bundle install</p>
<p>The post <a href="https://georgemastro.com/bundle-install-could-not-locate-gemfile/">bundle install &gt;&gt; Could not locate Gemfile</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Running<br />
<code>drush omega-guard</code></p>
<p><strong>Solution:</strong><br />
You just have to go to the proper theme folder and run first:<br />
<code>bundle install</code></p>
<p>The post <a href="https://georgemastro.com/bundle-install-could-not-locate-gemfile/">bundle install &gt;&gt; Could not locate Gemfile</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ERROR: ASCII &#8216;\0&#8217; appeared in the statement, but this is not allowed unless option&#8230;</title>
		<link>https://georgemastro.com/error-ascii-0-appeared-in-the-statement-but-this-is-not-allowed-unless-option/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Fri, 30 May 2014 14:51:17 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sysadmin]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=22</guid>

					<description><![CDATA[<p>ERROR: ASCII &#8216;\0&#8217; appeared in the statement, but this is not allowed unless option &#8211;binary-mode is enabled and mysql is run in non-interactive mode. Set &#8211;binary-mode to 1 if ASCII &#8216;\0&#8217; is expected. Query:  Today I came across with this very weird error message while trying to import my database from shell. Well&#8230;.it&#8217;s not very [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/error-ascii-0-appeared-in-the-statement-but-this-is-not-allowed-unless-option/">ERROR: ASCII &#8216;\0&#8217; appeared in the statement, but this is not allowed unless option&#8230;</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>ERROR: ASCII &#8216;\0&#8217; appeared in the statement, but this is not allowed unless option &#8211;binary-mode is enabled and mysql is run in non-interactive mode. Set &#8211;binary-mode to 1 if ASCII &#8216;\0&#8217; is expected. Query: </strong></p>
<p><span id="more-22"></span><br />
Today I came across with this very weird error message while trying to import my database from shell. Well&#8230;.it&#8217;s not very clear what the heck is going on, but the solution is very simple. You just have to gunzip your sql.gz file before you import it.<br />
So just run<br />
<code>gunzip myfile.sql.gz</code></p>
<p>The post <a href="https://georgemastro.com/error-ascii-0-appeared-in-the-statement-but-this-is-not-allowed-unless-option/">ERROR: ASCII &#8216;\0&#8217; appeared in the statement, but this is not allowed unless option&#8230;</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to start ghost on CentOS automatically</title>
		<link>https://georgemastro.com/how-to-start-ghost-on-centos-automatically/</link>
		
		<dc:creator><![CDATA[mastro]]></dc:creator>
		<pubDate>Thu, 29 May 2014 19:12:11 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[ghost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[script]]></category>
		<guid isPermaLink="false">http://georgemastro.com/?p=5</guid>

					<description><![CDATA[<p>CentOS init script for the ghost blogging platform There are actually 4 ways to automatically start ghost automatically. Some prefer &#8220;forever&#8221;, take a look here http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever/ Other prefer &#8220;upstart&#8221;, guide here http://www.howtoinstallghost.com/how-to-start-ghost-as-a-service-on-linux/ Another one is &#8220;pm2&#8221;, http://www.allaboutghost.com/keep-ghost-running-with-pm2/ But I prefer setting up an init script for Linux and in this case CentOS 6. Here is [&#8230;]</p>
<p>The post <a href="https://georgemastro.com/how-to-start-ghost-on-centos-automatically/">How to start ghost on CentOS automatically</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>CentOS init script for the ghost blogging platform</p>
<p>There are actually 4 ways to automatically start ghost automatically.</p>
<p>Some prefer &#8220;forever&#8221;, take a look here http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever/<span id="more-5"></span></p>
<p>Other prefer &#8220;upstart&#8221;, guide here http://www.howtoinstallghost.com/how-to-start-ghost-as-a-service-on-linux/</p>
<p>Another one is &#8220;pm2&#8221;, http://www.allaboutghost.com/keep-ghost-running-with-pm2/</p>
<p>But I prefer setting up an init script for Linux and in this case CentOS 6.</p>
<p>Here is the Code I&#8217;ve used. You should put it in a new file here: /etc/init.d/ghost<br />
<code><br />
#!/bin/sh<br />
#<br />
# ghost - this script starts the ghost blogging package<br />
#<br />
# chkconfig: - 95 20<br />
# description: ghost is a blogging platform built using javascript \<br />
# and running on nodejs<br />
#</code></p>
<p># Source function library.<br />
. /etc/rc.d/init.d/functions</p>
<p># Source networking configuration.<br />
. /etc/sysconfig/network</p>
<p># Check that networking is up.<br />
[ &#8220;$NETWORKING&#8221; = &#8220;no&#8221; ] &amp;&amp; exit 0</p>
<p>home=&#8221;/var/www/georgemastro.com/web/&#8221;<br />
exec=&#8221;/usr/local/bin/node index.js &gt;&gt; /var/www/georgemastro.com/log/ghost.log &amp;&#8221;<br />
prog=&#8221;ghost&#8221;</p>
<p>[ -e /etc/sysconfig/$prog ] &amp;&amp; . /etc/sysconfig/$prog</p>
<p>lockfile=/var/lock/subsys/$prog</p>
<p>start() {<br />
#[ -x $exec ] || exit 5<br />
echo -n $&#8221;Starting $prog: &#8221;<br />
# if not running, start it up here, usually something like &#8220;daemon $exec&#8221;<br />
export NODE_ENV=production<br />
cd $home<br />
daemon &#8211;user=root $exec<br />
retval=$?<br />
echo<br />
[ $retval -eq 0 ] &amp;&amp; touch $lockfile<br />
return $retval<br />
}</p>
<p>stop() {<br />
echo -n $&#8221;Stopping $prog: &#8221;<br />
# stop it here, often &#8220;killproc $prog&#8221;<br />
pid=`ps -u $prog -fw | grep $prog | grep -v &#8221; grep &#8221; | awk &#8216;{print $2}&#8217;`<br />
kill -9 $pid &gt; /dev/null 2&gt;&amp;1 &amp;&amp; echo_success || echo_failure<br />
retval=$?<br />
echo<br />
[ $retval -eq 0 ] &amp;&amp; rm -f $lockfile<br />
return $retval<br />
}</p>
<p>restart() {<br />
stop<br />
start<br />
}</p>
<p>my_status() {<br />
local base pid lock_file=</p>
<p>base=${1##*/}</p>
<p># get pid<br />
pid=`ps -u $prog -fw | grep $prog | grep -v &#8221; grep &#8221; | awk &#8216;{print $2}&#8217;`</p>
<p>if [ -z &#8220;${lock_file}&#8221; ]; then<br />
lock_file=${base}<br />
fi<br />
# See if we have no PID and /var/lock/subsys/${lock_file} exists<br />
if [[ -z &#8220;$pid&#8221; &amp;&amp; -f /var/lock/subsys/${lock_file} ]]; then<br />
echo $&#8221;${base} dead but subsys locked&#8221;<br />
return 2<br />
fi</p>
<p>if [ -z &#8220;$pid&#8221; ]; then<br />
echo $&#8221;${base} is stopped&#8221;<br />
return 3<br />
fi</p>
<p>if [ -n &#8220;$pid&#8221; ]; then<br />
echo $&#8221;${base} (pid $pid) is running&#8230;&#8221;<br />
return 0<br />
fi</p>
<p>}</p>
<p>rh_status() {<br />
# run checks to determine if the service is running or use generic status<br />
my_status $prog<br />
}</p>
<p>rh_status_q() {<br />
rh_status &gt;/dev/null 2&gt;&amp;1<br />
}</p>
<p>case &#8220;$1&#8243; in<br />
start)<br />
rh_status_q &amp;&amp; exit 0<br />
$1<br />
;;<br />
stop)<br />
rh_status_q || exit 0<br />
$1<br />
;;<br />
restart)<br />
$1<br />
;;<br />
status)<br />
rh_status<br />
;;<br />
*)<br />
echo $&#8221;Usage: $0 {start|stop|restart|status}&#8221;<br />
exit 2<br />
esac<br />
exit $?</p>
<p>Make sure you give the file proper permissions<br />
<code>chmod 755 /etc/init.d/ghost</code></p>
<p>Then the only thing you have to do is type<br />
<code>service ghost start</code></p>
<p>And finally you just have to set this script to run on every reboot of your server.<br />
<code>chkconfig --levels 235 ghost on</code></p>
<p>The post <a href="https://georgemastro.com/how-to-start-ghost-on-centos-automatically/">How to start ghost on CentOS automatically</a> appeared first on <a href="https://georgemastro.com">george mastro</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
