<?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 Design Workplace &#187; secure wp-config.php</title>
	<atom:link href="http://webdesignworkplace.com/tag/secure-wp-configphp/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesignworkplace.com</link>
	<description>Affordable Web Design Integrated with SEO</description>
	<lastBuildDate>Sat, 31 Jul 2010 16:35:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Securing your WP-Config.php</title>
		<link>http://webdesignworkplace.com/7/securing-wp-config-php/</link>
		<comments>http://webdesignworkplace.com/7/securing-wp-config-php/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 16:03:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Learn About WordPress]]></category>
		<category><![CDATA[secure wp-config.php]]></category>
		<category><![CDATA[securing apache websites]]></category>
		<category><![CDATA[wordpress tips]]></category>
		<category><![CDATA[wp files]]></category>

		<guid isPermaLink="false">http://webdesignworkplace.com/?p=7</guid>
		<description><![CDATA[One of the key components of a WordPress blog is a file called wp-config.php and it&#8217;s used to control administrator access. WordPress blogs will not run unless the 3 critical administrator supplied fields are in the wp-config file. These are 1.) the name of the MuSql database the blog is going to run on 2.) [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://webdesignworkplace.com/images/blog/wp-config-001-350x230.jpg" alt="" width="350" height="230" /></p>
<p>One of the key components of a WordPress blog is a file called wp-config.php and it&#8217;s used to control administrator access. WordPress blogs will not run unless the 3 critical administrator supplied fields are in the wp-config file. These are</p>
<p>1.) the name of the MuSql database the blog is going to run on</p>
<p>2.) the name of the administrator of the MySql database or &#8220;username&#8221;</p>
<p>3.) the password for the database administrator user</p>
<p>the wp-config.php looks like this:</p>
<p>********************************************************************</p>
<p>&lt;?php<br />
/**<br />
* The base configurations of the WordPress.<br />
*<br />
* This file has the following configurations: MySQL settings, Table Prefix,<br />
* Secret Keys, WordPress Language, and ABSPATH. You can find more information by<br />
* visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing<br />
* wp-config.php} Codex page. You can get the MySQL settings from your web host.<br />
*<br />
* This file is used by the wp-config.php creation script during the<br />
* installation. You don&#8217;t have to use the web site, you can just copy this file<br />
* to &#8220;wp-config.php&#8221; and fill in the values.<br />
*<br />
* @package WordPress<br />
*/</p>
<p>// ** MySQL settings &#8211; You can get this info from your web host ** //<br />
/** The name of the database for WordPress */<br />
define(&#8216;DB_NAME&#8217;, &#8216;putyourdbnamehere&#8217;);</p>
<p>/** MySQL database username */<br />
define(&#8216;DB_USER&#8217;, &#8216;usernamehere&#8217;);</p>
<p>/** MySQL database password */<br />
define(&#8216;DB_PASSWORD&#8217;, &#8216;yourpasswordhere&#8217;);</p>
<p>********************************************************************</p>
<p>Your implementation of the wordpress config fil might look more like this:</p>
<p>define(&#8216;DB_NAME&#8217;, &#8216;cookiejar&#8217;);</p>
<p>/** MySQL database username */<br />
define(&#8216;DB_USER&#8217;, &#8216;baker&#8217;);</p>
<p>/** MySQL database password */<br />
define(&#8216;DB_PASSWORD&#8217;, &#8216;bakerspassword&#8217;);<br />
********************************************************************</p>
<p>WP-CONFIG.PHP begins life as a file called wp-config-sample.php and it is found at the root level of your installation. You have to modify the sample file adding the 3 critical fields, rename the file to wp-config.php, and upload it to your host site before your WordPress Blog will start properly.</p>
<p>The problem is that unless you do a few more steps, any decent hacker can see your ID and Password and Database name, and consequently HACK YOUR SITE.</p>
<p>THIS IS A UNIX HOSTING SOLUTION &#8211; this will run on all APACHE LINUX Servers</p>
<p>To prevent bad surfers from seeing and manipulating your config file, take these protective measures.</p>
<p>1.) Create and upload a file called .htaccess and put it in your root directory on the host.There are thousands of variations you can put in the file but this will do for starters</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># protect the htaccess file<br />
&lt;files .htaccess&gt;<br />
order allow,deny<br />
deny from all<br />
&lt;/files&gt;</p>
<p># limit file uploads to 10mb<br />
LimitRequestBody 10240000</p>
<p># protect wpconfig.php<br />
&lt;files wp-config.php&gt;<br />
order allow,deny<br />
deny from all<br />
&lt;/files&gt;</p>
<p># disable directory browsing<br />
Options All -Indexes</p>
<p>I put this text into a file I call htaccess.txt on my local drive, I upload it to the root of the host, and then I rename it on the host to .htaccess and then it immediately disappears because it acts like a system file.</p>
<p>For more information and details on this subject:</p>
<p><a href="http://www.josiahcole.com/2007/07/11/almost-perfect-htaccess-file-for-wordpress-blogs/" target="_blank">Josiah Cole Dot Com</a> &#8211; Published 7-11-07</p>
<p><a href="http://www.devlounge.net/code/protect-your-wordpress-wp-config-so-you-dont-get-hacked" target="_blank">DevLounge</a> &#8211; Published 11-14-07 by Ronald Huereca</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignworkplace.com/7/securing-wp-config-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
