<?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>Rui Miguel Feio &#187; Tech &#8211; Web Development</title>
	<atom:link href="http://www.ruifeio.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ruifeio.com</link>
	<description>Sharing knowledge with the world</description>
	<lastBuildDate>Sat, 24 Dec 2011 15:42:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting up Virtual Hosts on WampServer</title>
		<link>http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/</link>
		<comments>http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 13:30:49 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[Tech - Web Development]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=626</guid>
		<description><![CDATA[If you&#8217;re a web developer you know how fantastic WampServer is in allowing you to have Apache, MySQL and PHP server locally under Windows. This allows you to test all your websites locally before you upload them into the &#8220;real&#8221; server. Now, the problem is that by default if you have two sites (site1 and [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a web developer you know how fantastic WampServer is in allowing you to have Apache, MySQL and PHP server locally under Windows. This allows you to test all your websites locally before you upload them into the &#8220;real&#8221; server.</p>
<p>Now, the problem is that by default if you have two sites (site1 and site2) locally, it&#8217;s always a pain having to browse them by using &#8220;http://localhost/site1/index.php&#8221; as a URL.</p>
<p>The best way is always to make the URL shorter and for this WampServer allows you to create Virtual Hosts. The general idea of Virtual Hosts is<br />
that you can use something like &#8220;http://site1&#8243; or &#8220;http://site2&#8243; instead of having to use the complete URL.</p>
<p><strong>Here&#8217;s how you do it:</strong></p>
<p>1. Edit the &#8220;hosts&#8221; file on your windows system (usually located at c:\WINDOWS\system32\drivers\etc\)</p>
<p>2. Add the following to the end of the hosts file:</p>
<p>127.0.0.1        site1<br />
127.0.0.1	 site2</p>
<p>This tells your computer that any url with a value of &#8216;site1&#8242; or &#8216;site2&#8242; should be routed to 127.0.0.1 or more commonly refered to as localhost.</p>
<p>3. Save your changes.</p>
<p>4. Now go to &#8220;C:\wamp\bin\apache\Apache2.2.17\conf&#8221; and edit file &#8220;httpd.conf&#8221;</p>
<p>5. Search for &#8220;httpd-vhosts.conf&#8221;</p>
<p>6. Remove the &#8220;#&#8221; from the beginning of the line &#8220;Include conf/extra/httpd-vhosts.conf&#8221;</p>
<p>7. Now go to &#8220;C:\wamp\bin\apache\Apache2.2.17\conf\extra&#8221; and edit file &#8220;httpd-vhosts.conf&#8221;</p>
<p>8. Add the following lines to the end of this file:</p>
<div>
<div>&lt;VirtualHost *:80&gt;</div>
<div>ServerAdmin webmaster@localhost</div>
<div>DocumentRoot &#8220;C:/wamp/www/site1/&#8221;</div>
<div>ServerName site1</div>
<div>ErrorLog &#8220;C:/wamp/www/logs/site1.log&#8221;</div>
<div>CustomLog &#8220;C:/wamp/www/logs/common.log&#8221; common</div>
<div>&lt;/VirtualHost&gt;</div>
<div></div>
<div>&lt;VirtualHost *:80&gt;</div>
<div>ServerAdmin webmaster@localhost</div>
<div>DocumentRoot &#8220;C:/wamp/www/site2/&#8221;</div>
<div>ServerName site2</div>
<div>ErrorLog &#8220;C:/wamp/www/logs/site2.log&#8221;</div>
<div>CustomLog &#8220;C:/wamp/www/logs/common.log&#8221; common</div>
<div>&lt;/VirtualHost&gt;</div>
</div>
<p>9. Click on the WampServer icon</p>
<p>10. Select &#8220;Restart All Services&#8221;</p>
<p>And that&#8217;s it! From now on you only have to use &#8220;http://site1&#8243; and &#8220;http://site2&#8243; as URLs for your 2 local websites.</p>
<p><strong>Notes:</strong></p>
<p>- These instructions may not work for older versions of WampServer.<br />
- On Windows 7 you will need to edit the &#8220;hosts&#8221; file running Notepad as Administrator.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change the www root directory on WampServer</title>
		<link>http://www.ruifeio.com/2011/01/30/change-the-www-root-directory-on-wampserver/</link>
		<comments>http://www.ruifeio.com/2011/01/30/change-the-www-root-directory-on-wampserver/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 12:43:46 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[Tech - Web Development]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=624</guid>
		<description><![CDATA[If you do not wish to use &#8220;c:/wamp/www/&#8221; as your DocumentRoot you simply have to perform the following steps: 1. Click on the WampServer icon 2. Select Apache &#62; httpd.conf 3. Search for &#8220;DocumentRoot&#8221; 4. Change the path to whatever you wish to be the new Document root directory (make sure to use a forward [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not wish to use &#8220;c:/wamp/www/&#8221; as your DocumentRoot you simply have to perform the following steps:</p>
<p>1. Click on the WampServer icon</p>
<p>2. Select Apache &gt; httpd.conf</p>
<p>3. Search for &#8220;DocumentRoot&#8221;</p>
<p>4. Change the path to whatever you wish to be the new Document root directory (make sure to use a forward slash instead of a back slash)</p>
<p>5. Search once again for &#8220;DocumentRoot&#8221;</p>
<p>6. You will find something like: &#8220;&#8221;</p>
<p>7. Once again change the path to whatever you wish to be the new Document root directory (make sure to use a forward slash instead of a back slash)</p>
<p>8. Save your changes</p>
<p>9. Click on the WampServer icon</p>
<p>10. Select option &#8220;Restart All Services&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2011/01/30/change-the-www-root-directory-on-wampserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP parameter session.gc_maxlifetime is lower that cookie validity configured in phpMyAdmin</title>
		<link>http://www.ruifeio.com/2009/12/05/php-parameter-session-gc_maxlifetime-is-lower-that-cookie-validity-configured-in-phpmyadmin/</link>
		<comments>http://www.ruifeio.com/2009/12/05/php-parameter-session-gc_maxlifetime-is-lower-that-cookie-validity-configured-in-phpmyadmin/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 11:55:22 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[PhpMyAdmin]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=432</guid>
		<description><![CDATA[If you have installed a new MySQL version you may be getting the following warning message: Your PHP parameter session.gc_maxlifetime is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin. To solve this issue we first need to check what the session.gc_maxlifetime value is in [...]]]></description>
			<content:encoded><![CDATA[<p>If you have installed a new MySQL version you may be getting the following warning message:</p>
<p><code style="font-size: 12px">Your PHP parameter session.gc_maxlifetime is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.</code></p>
<p>To solve this issue we first need to check what the <code style="font-size: 12px">session.gc_maxlifetime</code> value is in <code style="font-size: 12px">php.ini</code> and what the <code style="font-size: 12px">$cfg['LoginCookieValidity']</code> is in config.inc.php.</p>
<p><strong>Example:</strong></p>
<p>1. php.ini</p>
<p><code style="font-size: 12px">session.gc_maxlifetime = 1440</code></p>
<p>2. config.inc.php</p>
<p><code style="font-size: 12px">$cfg['LoginCookieValidity'] = 1800;</code></p>
<p>Now, we only need to make these two values the same. For the sake of this example, we will change the value of <code style="font-size: 12px">$cfg['LoginCookieValidity']</code> to 1440.</p>
<p>After saving the changes we need to restart the services to make them effective.</p>
<p><strong>Notes:</strong></p>
<p>1.The php.ini file can be found on the php folder.</p>
<p>2. The config.inc.php file can be found on the phpmyadmin folder.</p>
<hr/>
<p>If you&#8217;re interested in learning more about PhpMyAdmin then check out the book &#8220;<a href="http://www.ruifeio.com/mastering-phpmyadmin">Mastering PhpMydmin for Effective MySQL Management</a>&#8220;.</p>
<hr/>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/12/05/php-parameter-session-gc_maxlifetime-is-lower-that-cookie-validity-configured-in-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notice:  Undefined index: message in /home/example.php on line 9</title>
		<link>http://www.ruifeio.com/2009/09/28/notice-undefined-index-message-in-hometestexample-php-on-line-3/</link>
		<comments>http://www.ruifeio.com/2009/09/28/notice-undefined-index-message-in-hometestexample-php-on-line-3/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:25:46 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=390</guid>
		<description><![CDATA[If  you&#8217;re getting this message on PHP this is due to your PHP error reporting settings not being set correctly. You can suppress the Notice warnings by changing the error reporting settings on PHP.ini (permanent change) or adding an extra line to your PHP script. Changing PHP.ini: Changing your PHP.ini makes the change permanent and [...]]]></description>
			<content:encoded><![CDATA[<p>If  you&#8217;re getting this message on PHP this is due to your PHP error reporting settings not being set correctly.</p>
<p>You can suppress the Notice warnings by changing the error reporting settings on PHP.ini (permanent change) or adding an extra line to your PHP script.</p>
<p><strong>Changing PHP.ini:</strong></p>
<p>Changing your PHP.ini makes the change permanent and available to every PHP script you run.</p>
<ol>
<li>Edit your PHP.ini file</li>
<li>Locate the line that has <em>error_reporting</em> without the <em>;</em> in the beginning (ex: <em>error_reporting = E_ALL</em>)</li>
<li>Change this to <em>error_reporting = E_ALL &amp; ~E_NOTICE</em></li>
<li>Save PHP.ini</li>
</ol>
<p><strong>Adding line to your script:</strong></p>
<p>Just add the following line to the beginning of your script:</p>
<p><em>error_reporting (E_ALL ^ E_NOTICE);</em></p>
<p><strong>Explanation:</strong></p>
<p><em>error_reporting = E_ALL &amp; ~E_NOTICE</em> tells the system to show all errors and warnings except those for notices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/09/28/notice-undefined-index-message-in-hometestexample-php-on-line-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin root with no password message</title>
		<link>http://www.ruifeio.com/2009/09/17/phpmyadmin-root-with-no-password-message/</link>
		<comments>http://www.ruifeio.com/2009/09/17/phpmyadmin-root-with-no-password-message/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 11:35:53 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[PhpMyAdmin]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=380</guid>
		<description><![CDATA[After installing WAMP Server it is common when you first access phpMyAdmin to get the following message: &#8220;Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by [...]]]></description>
			<content:encoded><![CDATA[<p>After installing WAMP Server it is common when you first access phpMyAdmin to get the following message:</p>
<p>&#8220;Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user &#8216;.root&#8217;.&#8221;</p>
<p><strong>To correct this security issue you need to do the following:</strong></p>
<ol>
<li>Go to <em>phpMyAdmin</em></li>
<li>Select the <em>Privileges</em> tab</li>
<li>Locate the user &#8220;<em>root</em>&#8221; that has <em>localhost </em>for a host</li>
<li>Edit the root user privileges by clicking on the corresponding <em>Edit Privileges</em> button</li>
<li>On the <em>Change Password</em> section insert the desired password and press <em>Go</em></li>
<li>You should now have at the top of the screen the message: &#8220;<em>The password for &#8216;root&#8217;@'localhost&#8217; was changed successfully.</em>&#8220;</li>
<li>Now you need to edit file <em>config.inc.php</em> normally located at <em>C:\wamp\apps\phpmyadmin3.2.0.1</em> (note that the version indication may  vary)</li>
<li>Locate <em>$cfg['Servers'][$i]['auth_type'] = &#8216;config&#8217;;</em> and change from <em>config </em>to <em>cookie </em>so that you get a login window every time you access phpMyAdmin</li>
<li>Locate <em>$cfg['blowfish_secret'] = &#8216;  &#8216;;</em> line. If you don&#8217;t have one add it to your <em>config.inc.php</em> file</li>
<li>Add a secret passphrase to <em>$cfg['blowfish_secret'] = &#8216;  &#8216;;</em> for example: <em>$cfg['blowfish_secret'] = &#8216;secret_pass&#8217;;</em></li>
<li>Save your changes</li>
<li>Go to the WAMPServer and select <em>Restart All Services</em></li>
<li>Once all the services have been restarted go to <em>phpMyAdmin</em> and enter the username root and your password to access phpMyAmdin</li>
</ol>
<p><strong>Notes:</strong></p>
<ol>
<li>The <em>blowfish_secret</em> passphrase should not be the same as the root password.</li>
<li>If you don&#8217;t add a <em>$cfg['blowfish_secret']</em> line to the <em>config.inc.php</em> file, when you access phpMyAdmin you&#8217;ll get the message: &#8220;<em>The configuration file now needs a secret passphrase (blowfish_secret).</em>&#8220;</li>
</ol>
<hr/>
<p>If you&#8217;re interested in learning more about PhpMyAdmin then check out the book &#8220;<a href="http://www.ruifeio.com/mastering-phpmyadmin">Mastering PhpMydmin for Effective MySQL Management</a>&#8220;.</p>
<hr/>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/09/17/phpmyadmin-root-with-no-password-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup and Restore a web site in CPANEL</title>
		<link>http://www.ruifeio.com/2009/08/16/backup-and-restore-a-web-site-in-cpanel/</link>
		<comments>http://www.ruifeio.com/2009/08/16/backup-and-restore-a-web-site-in-cpanel/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 20:18:46 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=246</guid>
		<description><![CDATA[It&#8217;s a good practice to make backups prior to submit any changes to your site. Time and again people skip the backup to find themselves with problems and not having an easy and quick way to undo their changes. This may not seem a big problem, but if the changes were done to the web [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a good practice to make backups prior to submit any changes to your site.</p>
<p>Time and again people skip the backup to find themselves with problems and not having an easy and quick way to undo their changes. This may not seem a big problem, but if the changes were done to the web site of your business and now the web site is not working probably, this means you&#8217;re losing money!</p>
<p>Backing up a site is easy and even more if your web server uses CPANEL.</p>
<p><strong>Consider the following steps to BACKUP your site:</strong></p>
<ul>
<li>To Backup the files of your site:
<ol>
<li>On <em>CPANEL </em>select option <em>Backups</em></li>
<li>Under <em>Home Directory</em> select option <em>Download a home directory Backup</em></li>
<li>Select <em>Save File</em></li>
</ol>
</li>
<li>To Backup the Databases of your site:
<ol>
<li>On <em>CPANEL </em>select option Backups</li>
<li>Under <span><em>Download a MySQL Database Backup </em>select the Database you wish to Backup</span></li>
<li><span>Select <em>Save File</em></span></li>
<li><span>Repeat Steps 2 and 3 for any other Database you wish to backup</span></li>
</ol>
</li>
</ul>
<p><strong>Consider the following steps to RESTORE your site:</strong></p>
<ul>
<li>To Restore the files of your site:
<ol>
<li>On <em>CPANEL </em>select option <em>Backups</em></li>
<li>Under <em><span>Restore a Home Directory Backup </span></em><span>select <em>Browse </em>and locate the backup you want to restore from<br />
</span></li>
<li>Select <em>Upload</em></li>
</ol>
</li>
<li>To Restore the Databases of your site:
<ol>
<li>On <em>CPANEL </em>select option Backups</li>
<li>Under <em><span>Restore a MySQL Database</span></em><span><em> </em>select <em>Browse </em>and locate the backup you want to restore from.<br />
</span></li>
<li><span>Select <em>Upload</em></span></li>
<li><span>Repeat Steps 2 and 3 for any other Database you wish to restore</span></li>
</ol>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/08/16/backup-and-restore-a-web-site-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move a WordPress site to a different Server or URL</title>
		<link>http://www.ruifeio.com/2009/08/08/how-to-move-a-wordpress-site-to-a-different-server-or-url/</link>
		<comments>http://www.ruifeio.com/2009/08/08/how-to-move-a-wordpress-site-to-a-different-server-or-url/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 18:10:01 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=203</guid>
		<description><![CDATA[Moving a WordPress site from one server to another or to a different Web address (URL) may seem a daunting task and something to stay away from. The truth is that it is quite simple! Last month I was asked to help moving a WordPress (WP) blog from one server to another and I thought [...]]]></description>
			<content:encoded><![CDATA[<p>Moving a WordPress site from one server to another or to a different Web address (URL) may seem a daunting task and something to stay away from. The truth is that it is quite simple!</p>
<p>Last month I was asked to help moving a WordPress (WP) blog from one server to another and I thought I should share with the world how this can be done.</p>
<p>Performing this task requires 3 major steps:</p>
<p>1. Move the WordPress Source Code<br />
2. Move the WordPress Database<br />
3. Update the WordPress configuration</p>
<p>For the sake of this example I will provide the general instructions for a WordPress running on LAMP (Lunix, Apache, MySQL and PHP) environment with CPanel and I&#8217;ll assume that we want to move it from http://www.original-server.com/blog to http://www.destination-server.com/blog.</p>
<p><strong>STEP 1 &#8211; Move the WordPress Source Code:</strong></p>
<p><em><span style="text-decoration: underline;"> (Original server)- Download the WordPress source files:</span></em></p>
<p>1. On <em>CPanel </em>select &#8220;<em>File Manager</em>&#8221;<br />
2. Tick (check) the folder that contains the WordPress blog source files (ex: blog)<br />
3. Select &#8220;<em>Compress</em>&#8221; from the menu<br />
4. Select &#8220;<em>Compress File(s)</em>&#8221;<br />
5. Tick (check) the <em>zip </em>file you&#8217;ve just created<br />
6. Select &#8220;<em>Download</em>&#8221; from the menu and save the <em>zip </em>file locally<br />
7. Once the download is finished delete the <em>zip </em>file from the server</p>
<p><em><span style="text-decoration: underline;">(Destination Server) &#8211; Upload the WordPress source code:</span></em></p>
<p>1. On <em>CPanel </em>select &#8220;<em>File Manager</em>&#8221;<br />
2. Select the &#8220;<em>Upload</em>&#8221; option<br />
3. Locate and select the <em>zip </em>file that contains the WordPress source code you&#8217;ve copied into your PC.<br />
4. Upload your file into the new server<br />
5. Select the <em>zip </em>file<br />
6. Select &#8220;<em>Extract</em>&#8221; from menu<br />
7. Delete <em>Zip </em>file from server</p>
<p>Note: Beware! When you <em>unzip </em>the file if a directory already exists with the same name its content will be replaced!</p>
<p><strong>STEP 2 &#8211; Move the WordPress Database:</strong></p>
<p><em><span style="text-decoration: underline;">(Original Server) &#8211; Export WordPress Database:</span></em></p>
<p>1. On <em>CPanel </em>select option &#8220;<em>phpMyAdmin</em>&#8221; (MySQL Databases)<br />
2. Select the WordPress Database that you want to export (ex: wp01)<br />
2. Select &#8220;<em>Export</em>&#8221;<br />
3. Make sure all the <em>Tables </em>are selected<br />
4. Leave all the default options ticked<br />
5. Make sure to download as an <em>SQL </em>file<br />
6. Check &#8220;<em>Save as File</em>&#8221;<br />
7. Click &#8220;<em>Go</em>&#8221; and save it locally</p>
<p>Note: In addition you may also select &#8220;<em>zipped</em>&#8221; or &#8220;<em>gzipped</em>&#8221; to compress your database when downloading it.</p>
<p><em><span style="text-decoration: underline;">(Destination Server) &#8211; Create new Database:</span></em></p>
<p>1. On <em>CPanel </em>select &#8220;<em>MySQL Databases</em>&#8221;<br />
2. Create a new <em>DB </em>for the blog (ex: wp01) and if possible with the same name as it had originally<br />
3. Create a new <em>user </em>for the blog if possible with the same name as originally<br />
4. Associate the new <em>user </em>with the WordPress <em>Database </em>you&#8217;ve just created and all privileges to it.</p>
<p><span style="text-decoration: underline;"><em>(Locally) &#8211; Update WordPress MySQL database:</em></span></p>
<p>1. Edit the WordPress SQL <em>database </em>you&#8217;ve downloaded from the original server.<br />
2. If the web address <em>URL </em>has changed:</p>
<ul>
<li>replace all references of the old <em>URL </em>with the new <em>URL</em></li>
<li> note that if on the new server you&#8217;re using a different directory, this needs to change too.</li>
</ul>
<p>3. If the email addresses have changed, replace them with the new addresses.<br />
4. Save your changes.</p>
<p><span style="text-decoration: underline;"><em>(Destination server) &#8211; Upload WordPress Database:</em></span></p>
<p>1. On <em>CPanel</em>, select &#8220;<em>phpMyAdmin</em>&#8221; (MySQL Databases)<br />
2. Select the WordPress <em>Database</em><br />
3. Select the &#8220;<em>Import</em>&#8221; option<br />
4. Locate and select the WordPress SQL <em>Database </em>you have saved locally.<br />
5. <em>Import </em>file</p>
<p><strong>STEP 3 &#8211; Update the WordPress configuration:</strong></p>
<p><em><span style="text-decoration: underline;">(Destination Server) &#8211; Update config file:</span></em></p>
<p>1. On <em>Cpanel </em>select &#8220;<em>File Manager</em>&#8221;<br />
2. Locate and edit WordPress configuration file &#8220;<em>wp-config.php</em>&#8221;<br />
3. Update WP <em>DB name</em> with the new WordPress Database name:   define(&#8216;DB_NAME&#8217;, &#8216;database_name_goes_here&#8217;);<br />
4. Update <em>user name</em>:  define(&#8216;DB_USER&#8217;, &#8216;user_name_goes_here&#8217;);<br />
5. Update <em>Database password</em>:  define(&#8216;DB_PASSWORD&#8217;, &#8216;password_goes_here&#8217;);<br />
6. Update <em>hostname </em>(if required):  define(&#8216;DB_HOST&#8217;, &#8216;hostname_goes_here&#8217;);<br />
7. Save your changes</p>
<p><strong>STEP 4 &#8211; Testing:</strong></p>
<p>1. Simply test your blog to make sure that all the functionalities are available</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/08/08/how-to-move-a-wordpress-site-to-a-different-server-or-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to select the First row from a MySQL table</title>
		<link>http://www.ruifeio.com/2009/07/06/how-to-select-the-first-row-from-a-mysql-table/</link>
		<comments>http://www.ruifeio.com/2009/07/06/how-to-select-the-first-row-from-a-mysql-table/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:30:07 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=178</guid>
		<description><![CDATA[You can use the following command to get the first row from a MySQL table: SELECT * FROM table LIMIT 1 Explanation: table - table name By limiting the returns to 1 (LIMIT 1) we get the first row from the table. Example: SELECT * FROM tusers LIMIT 1]]></description>
			<content:encoded><![CDATA[<p>You can use the following command to get the first row from a MySQL table:</p>
<p>SELECT * FROM <em>table </em>LIMIT 1</p>
<p><strong>Explanation:</strong></p>
<p><em>table </em>- table name</p>
<p><em> </em></p>
<p>By limiting the returns to 1 (LIMIT 1) we get the first row from the table.</p>
<p><strong>Example:</strong></p>
<p>SELECT * FROM <em>tusers </em>LIMIT 1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/07/06/how-to-select-the-first-row-from-a-mysql-table/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to select the Last row from a MySQL table</title>
		<link>http://www.ruifeio.com/2009/07/06/how-to-select-the-last-row-from-a-mysql-table/</link>
		<comments>http://www.ruifeio.com/2009/07/06/how-to-select-the-last-row-from-a-mysql-table/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:24:44 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=174</guid>
		<description><![CDATA[You can use the following command to get the last row from a MySQL table: SELECT * FROM table ORDER BY field DESC LIMIT 1 Explanation: table - table name field - table field This command orders the table by DESCENDING order and limits the number of rows returned to 1. Since DESCENDING reverses the [...]]]></description>
			<content:encoded><![CDATA[<p>You can use the following command to get the last row from a MySQL table:</p>
<p>SELECT * FROM <em>table </em>ORDER BY <em>field </em>DESC LIMIT 1</p>
<p><strong>Explanation:</strong></p>
<p><em>table </em>- table name</p>
<p><em>field </em>- table field</p>
<p>This command orders the table by DESCENDING order and limits the number of rows returned to 1. Since DESCENDING reverses the normal table order, we get its last row.</p>
<p><strong>Example:</strong></p>
<p>SELECT * FROM <em>tusers </em>ORDER BY <em>user_id</em> DESC LIMIT 1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/07/06/how-to-select-the-last-row-from-a-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Select random rows from a MySQL table</title>
		<link>http://www.ruifeio.com/2009/07/06/select-random-rows-from-mysql-table/</link>
		<comments>http://www.ruifeio.com/2009/07/06/select-random-rows-from-mysql-table/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:14:41 +0000</pubDate>
		<dc:creator>Rui Miguel Feio</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.ruifeio.com/?p=168</guid>
		<description><![CDATA[If you ever come across the need of randomly select rows from a MySQL table: SELECT * FROM table WHERE field1 = value ORDER BY RAND() LIMIT x Explanation: table - table name field1 - table field value - value you want field1 to be x &#8211; number of rows to return Example: SELECT * [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever come across the need of randomly select rows from a MySQL table:</p>
<p>SELECT * FROM <em>table </em>WHERE <em>field1 </em>= <em>value </em>ORDER BY RAND() LIMIT <em>x</em></p>
<p><strong>Explanation:</strong></p>
<p><em>table </em>- table name</p>
<p><em>field1 </em>- table field</p>
<p><em>value </em>- value you want field1 to be</p>
<p><em>x</em> &#8211; number of rows to return</p>
<p><strong>Example:</strong></p>
<p>SELECT * FROM <em>tusers </em>WHERE <em>active_user </em>= &#8216;<em>Yes</em>&#8216; ORDER BY RAND() LIMIT <em>10</em></p>
<p>This command returns 10 random rows of active users from table tusers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruifeio.com/2009/07/06/select-random-rows-from-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

