<?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>Kwatog &#38; Co &#187; rename</title>
	<atom:link href="http://kwatog.com/tag/rename/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Fri, 04 May 2012 07:34:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Change WordPress Table Prefix</title>
		<link>http://kwatog.com/blog/change-wordpress-table-prefix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-wordpress-table-prefix</link>
		<comments>http://kwatog.com/blog/change-wordpress-table-prefix/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 14:18:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[prefix]]></category>
		<category><![CDATA[rename]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=168</guid>
		<description><![CDATA[As part of hardening your WordPress installation, it is recommended that we change the prefix of our WP tables. In that way, the &#8216;bad guys&#8217; and script kiddies will have to guess the name of your tables. Step 1 Suppose that you want mod as your new table prefix, run the following in your phpMyAdmin.&#8230;]]></description>
			<content:encoded><![CDATA[<p>As part of hardening your WordPress installation, it is recommended that we change the prefix of our WP tables. In that way, the &#8216;bad guys&#8217; and script kiddies will have to guess the name of your tables.</p>
<p><span id="more-168"></span></p>
<h4>Step 1</h4>
<p>Suppose that you want <strong>mod</strong> as your new  table prefix, run the following in your phpMyAdmin.<br />
<code><br />
RENAME TABLE  wp_commentmeta TO mod_commentmeta<br />
             ,wp_comments TO mod_comments<br />
             ,wp_links TO mod_links<br />
             ,wp_options TO mod_options<br />
             ,wp_postmeta TO mod_postmeta<br />
             ,wp_posts TO mod_posts<br />
             ,wp_terms TO mod_terms<br />
             ,wp_term_relationships TO mod_term_relationships<br />
             ,wp_term_taxonomy TO mod_term_taxonomy<br />
             ,wp_usermeta TO mod_usermeta<br />
             ,wp_users TO mod_users;<br />
</code></p>
<h4>Step 2</h4>
<p><code><br />
UPDATE `mod_options`<br />
SET `option_name` = 'mod_user_roles'<br />
WHERE `option_name` ='wp_user_roles'<br />
AND `blog_id` =0;<br />
</code></p>
<h4>Step 3</h4>
<p><code><br />
UPDATE `mod_usermeta`<br />
SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'mod_' )<br />
WHERE option_name LIKE 'wp_%';<br />
</code><br />
The preceding two steps are needed because in the later versions of WordPress, some tables are converted to records. Skipping these two steps will lead to permission error. To be specific, the error is as below.</p>
<blockquote><p>You do not have sufficient permissions to access this page.</p></blockquote>
<p>Hmn&#8230; well, that&#8217;s just it.</p>
<h4>Usual Disclaimer</h4>
<p>Renaming your table doesn&#8217;t mean that you&#8217;ll be safe from the bad guys (otherwise known as &#8216;hackers&#8217;). It&#8217;s just one of the holes to plug and will only help in hardening your installation. However, be aware that there could be other things that can break or compromised. So be vigilant and always install the latest version of WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/change-wordpress-table-prefix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rename Tables in MySQL</title>
		<link>http://kwatog.com/blog/mysql/rename-tables-in-mysql/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rename-tables-in-mysql</link>
		<comments>http://kwatog.com/blog/mysql/rename-tables-in-mysql/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 02:20:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress mu]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=121</guid>
		<description><![CDATA[If you want to hand code renaming tables, here&#8217;s the sample. Single Table RENAME TABLE wp_users TO kwg_users; multiple tables RENAME TABLE wp_users TO kwtg_users, wp_usermeta TO kwtg_usermeta, wp_site TO kwtg_wpsite, wp_signups TO kwtg_signups; This is handy when renaming a whole lot of tables as in the case of WordPress mu where each blog has&#8230;]]></description>
			<content:encoded><![CDATA[<p>If you want to hand code renaming tables, here&#8217;s the sample. </p>
<p><strong>Single Table</strong><br />
<code><br />
RENAME TABLE wp_users  TO kwg_users;<br />
</code></p>
<p><strong>multiple tables</strong><br />
<code><br />
RENAME TABLE wp_users  TO kwtg_users,<br />
                     wp_usermeta TO kwtg_usermeta,<br />
                     wp_site TO kwtg_wpsite,<br />
                     wp_signups TO kwtg_signups;<br />
</code></p>
<p>This is handy when renaming a whole lot of tables as in the case of <strong>WordPress mu</strong> where each blog has its own set of tables. If you decide to rename them for security reasons (like you forgot to change the default table prefix during installation), it will be a pain to change them one by one through <strong>phpMyAdmin</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/mysql/rename-tables-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

