<?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 Deploy Archives - Perth Ngarmtrakulchol</title>
	<atom:link href="https://www.byperth.com/tag/wordpress-deploy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.byperth.com/tag/wordpress-deploy/</link>
	<description>Just another data engineer</description>
	<lastBuildDate>Wed, 17 Feb 2016 10:17:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.10</generator>
	<item>
		<title>[WordPress] Deployment on Amazon EC2: Solutions to Permalinks &#038; PHP Issues</title>
		<link>https://www.byperth.com/2016/02/01/wordpress-deployment-amazon-ec2-solutions-permalinks-php-issues/</link>
					<comments>https://www.byperth.com/2016/02/01/wordpress-deployment-amazon-ec2-solutions-permalinks-php-issues/#respond</comments>
		
		<dc:creator><![CDATA[designil]]></dc:creator>
		<pubDate>Mon, 01 Feb 2016 21:11:19 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[WordPress Deploy]]></category>
		<guid isPermaLink="false">http://www.byperth.com/?p=357</guid>

					<description><![CDATA[<p>I have recently encountered 2 issues with deploying WordPress website on Amazon EC2; Permalinks not working on Amazon EC2 and old PHP version caused the code to break. I would like to note the solutions here in order to save hours of Googling for everyone 🙂 Permalink not working on Amazon EC2 We cannot get [&#8230;]</p>
<p>The post <a href="https://www.byperth.com/2016/02/01/wordpress-deployment-amazon-ec2-solutions-permalinks-php-issues/">[WordPress] Deployment on Amazon EC2: Solutions to Permalinks &#038; PHP Issues</a> appeared first on <a href="https://www.byperth.com">Perth Ngarmtrakulchol</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have recently encountered 2 issues with deploying WordPress website on Amazon EC2; Permalinks not working on Amazon EC2 and old PHP version caused the code to break.</p>
<p>I would like to note the solutions here in order to save hours of Googling for everyone 🙂</p>
<p><span id="more-357"></span></p>
<h2>Permalink not working on Amazon EC2</h2>
<p>We cannot get pretty permalink to work on Amazon EC2 with regard to these circumstances:</p>
<ul>
<li>mod_rewrite is already turned on (check in <strong>/etc/httpd/conf/httpd.conf</strong> or use <strong>&lt;?php phpinfo(); ?&gt;</strong>)</li>
<li>If we changed to default permalink of <strong>/?p=123, </strong>it works just fine</li>
<li><strong>.htaccess</strong> is generated automatically without a permission problem</li>
</ul>
<p>The solution is to allow .htaccess in httpd.conf by following these steps:</p>
<ol>
<li>Edit <strong>/etc/httpd/conf/httpd.conf</strong> in 2 places. From <strong>AllowOverride None</strong> to <strong>AllowOverride All</strong>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride All
&lt;/Directory&gt;

... and ...

AllowOverride All</pre>
</li>
<li>Restart httpd by running
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apachectl -k restart</pre>
</li>
<li>Make sure .htaccess is there. The pretty permalink should work now 😀</li>
</ol>
<p>Reference: <a href="http://guiem.info/permalinks-on-wordpress-amazon-ec2/">http://guiem.info/permalinks-on-wordpress-amazon-ec2/</a></p>
<h2>PHP Version is too old (PHP 5.3.xx)</h2>
<p>In our development environment, we were using PHP 5.6.1. As a consequence, after deployed on Amazon EC2 with PHP 5.3.xx, our PHP code breaks.</p>
<p>We have to find a way to remove PHP 5.3 in Amazon EC2 and install PHP 5.6. Finally, We found the solution remove PHP 5.3 on <a href="http://superuser.com/questions/880522/how-to-yum-update-php-to-version-5-4-on-amazon-linux">This StackOverflow</a>, and steps to install PHP 5.6 on <a href="http://stackoverflow.com/questions/29206795/how-to-install-php5-6-in-amazon-linux">Another StackOverflow</a>.</p>
<p>Here are the steps we used to remove old PHP 5.3 and install PHP 5.6:</p>
<ol>
<li>Remove old PHP with these commands
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo yum remove httpd*
yum remove php-cli.x86_64 php-common.x86_64 php-mysql.x86_64 php-pdo.x86_64 php-xml.x86_64</pre>
</li>
<li>Install new PHP with these commands:<br />
(Make sure to have MySQL installed beforehand by typing &#8216;mysql&#8217; in command line to test if it works)</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo yum install httpd24 php56
sudo yum install php56-xml php56-xmlrpc php56-soap php56-gd
sudo yum install php56-mysqlnd</pre>
</li>
<li>Restart Apache with this command
<pre class="EnlighterJSRAW" data-enlighter-language="null">sudo service httpd start
sudo service httpd restart</pre>
</li>
<li>Your PHP 5.6 code should work by now 😀</li>
</ol>
<p>Note that Amazon EC2 is based on different platform from DigitalOcean. Thus, apt-get function is not working. We will have to use something like &#8216;yum install xxx&#8217; instead of apt-get.</p>
<p>Hope this helps for anyone who tried to deploy WordPress on Amazon EC2 for the first time ! 🙂</p>
<p>The post <a href="https://www.byperth.com/2016/02/01/wordpress-deployment-amazon-ec2-solutions-permalinks-php-issues/">[WordPress] Deployment on Amazon EC2: Solutions to Permalinks &#038; PHP Issues</a> appeared first on <a href="https://www.byperth.com">Perth Ngarmtrakulchol</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.byperth.com/2016/02/01/wordpress-deployment-amazon-ec2-solutions-permalinks-php-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
