<?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; WordPress</title>
	<atom:link href="http://kwatog.com/category/blog/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Tue, 31 Jan 2012 06:27:55 +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>How To Turn Off eShop Test Mode</title>
		<link>http://kwatog.com/blog/wordpress/how-to-turn-off-eshop-test-mode/</link>
		<comments>http://kwatog.com/blog/wordpress/how-to-turn-off-eshop-test-mode/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 06:27:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[eshop]]></category>
		<category><![CDATA[estore]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[online store]]></category>
		<category><![CDATA[plugins]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=747</guid>
		<description><![CDATA[If you are using the latest WordPress version (which you should!!!), you&#8217;ll notice that eShop plugin will be perpetually set to Test Mode and there&#8217;s no way to turn it off. There&#8217;s quite a number of suggestions in the official forum at quirm.net but as it turns out, the option is inadvertently hidden. All you [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the latest WordPress version (which you should!!!), you&#8217;ll notice that eShop plugin will be perpetually set to Test Mode and there&#8217;s no way to turn it off. There&#8217;s quite a number of suggestions in the official forum at quirm.net but as it turns out, the option is inadvertently hidden. All you have to do is to activate the two column mode of the dashboard and you&#8217;ll be able to see the dropdown option.</p>
<p><!-- more --><br />
To be clear, here&#8217;s the screenshot on how to do it.<br />
<strong>Step 1 : </strong> click on 2 in the Number of Columns Screen options.<br />
<a href="http://kwatog.com/wp-content/uploads/2012/01/eshop_turn_off_test_mode_1.jpg"><img src="http://kwatog.com/wp-content/uploads/2012/01/eshop_turn_off_test_mode_1-300x67.jpg" alt="" title="eshop_turn_off_test_mode_1" width="300" height="67" class="alignnone size-medium wp-image-749" /></a><br />
<strong>Step 2 : </strong> Update the status to Live and click on Save.<br />
<a href="http://kwatog.com/wp-content/uploads/2012/01/eshop_turn_off_test_mode_2.jpg"><img src="http://kwatog.com/wp-content/uploads/2012/01/eshop_turn_off_test_mode_2-300x160.jpg" alt="" title="eshop_turn_off_test_mode_2" width="300" height="160" class="alignnone size-medium wp-image-748" /></a></p>
<p>For those looking for it, I know how you feel. I just felt too stupid to not thinking about it. Admittedly, it&#8217;s probably one of the many plugins affected by the latest WordPress enhancements. I bet once rich updated the plugin to conform with the new standard, then it won&#8217;t be a problem anymore. </p>
<p>Source:</p>
<p>http://quirm.net/forum/topic.php?id=4716</p>
<h4>Incoming search terms:</h4><ul><li>eshop test mode</li><li>disable eshop test mode</li><li>disable test mode eshop</li><li>eshop in test mode</li><li>eshop turn off the test mode</li><li>test mode eshop plugin</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/how-to-turn-off-eshop-test-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Cannot Allocate Memory Problem</title>
		<link>http://kwatog.com/blog/wordpress/apache-cannot-allocate-memory-problem/</link>
		<comments>http://kwatog.com/blog/wordpress/apache-cannot-allocate-memory-problem/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 16:42:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=616</guid>
		<description><![CDATA[For the past month, I have been encountering some problems with my WordPress installation. I keep getting the Error 500. I checked the log files and here&#8217;s what I found. (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for It&#8217;s can&#8217;t be right because JaguarPC has just upgraded my VPS and my new limit 640MB. [...]]]></description>
			<content:encoded><![CDATA[<p>For the past month, I have been encountering some problems with my WordPress installation. I keep getting the <strong>Error 500</strong>. I checked the log files and here&#8217;s what I found.<br />
<strong><code> (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for </code></strong><br />
<span id="more-616"></span><br />
It&#8217;s can&#8217;t be right because JaguarPC has just upgraded my VPS and my new limit 640MB. I checked my memory usage and it&#8217;s only 112MB. I raised a ticket and the support did not find any problem on my settings and they also noticed that I have ample amount of spare memory. Take note that my VPS has a 2GB burstable memory. So that&#8217;s quite big for a small site that I maintain. So what&#8217;s the problem? My guess is on my settings especially that I did not change it ever since I started with 198MB of guaranteed memory. Others are blaming WordPress 3.2. Honestly, I don&#8217;t know what&#8217;s the cause but here are the things that I did. </p>
<p>First, increase the prefork settings on httpd.conf.<br />
<code>&lt;IfModule prefork.c&gt;<br />
StartServers      5<br />
MinSpareServers   10<br />
MaxSpareServers  20<br />
ServerLimit     100<br />
MaxClients      100<br />
MaxRequestsPerChild  2000<br />
&lt;/IfModule&gt;<br />
</code><br />
Second is the KeepAlive settings which was set to Off<br />
<code><br />
KeepAlive Off<br />
</code></p>
<p>After doing this, it seemed like the server stabilized. However, I again hit the error the next day. So I again checked what I can change. This time, I looked at the php.ini&#8217;s memory limit.<br />
<code><br />
memory_limit = 32M      ; Maximum amount of memory a script may consume (8MB)<br />
</code><br />
That was originally 64M. I&#8217;ll update the post later if I hit the problem again. I might tweak both the php.ini and prefork settings if it fails again.</p>
<h4>Incoming search terms:</h4><ul><li>apache cannot allocate memory</li><li>Cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp</li><li>Cannot allocate memory: couldnt create child process: /opt/suphp/sbin/suphp</li><li>cannot allocate memory</li><li>cannot allocate memory apache</li><li>(12)Cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp</li><li>cannot allocate memory couldnt create child process opt suphp sbin suphp</li><li>cannot allocate memory couldn\t create child process wordpress</li><li>cannot allocate memory: couldnt create child process: /opt/suphp/sbin/suphp for apache</li><li>cannot allocate memory: couldn\t create child process: /opt/suphp/sbin/suphp for /home</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/apache-cannot-allocate-memory-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing Custom Fields on WordPress 3.2</title>
		<link>http://kwatog.com/blog/wordpress/missing-custom-fields-on-wordpress-3-2/</link>
		<comments>http://kwatog.com/blog/wordpress/missing-custom-fields-on-wordpress-3-2/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 16:24:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=609</guid>
		<description><![CDATA[I&#8217;m now using WordPress 3.2 in all my new installation. Of course, I already upgraded the rest of my websites. But I found something that&#8217;s really strange. The Custom Fields and a few other modules are missing the the post editor. I was thinking maybe it was removed in the latest version or that it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now using WordPress 3.2 in all my new installation. Of course, I already upgraded the rest of my websites. But I found something that&#8217;s really strange. The Custom Fields and a few other modules are missing the the post editor. I was thinking maybe it was removed in the latest version or that it may have been affected by an errant plugin. The problem is that I&#8217;m using TwentyEleven theme and no plugins and yet the Custom Fields module is missing. It turned out that there&#8217;s actually an option in the Screen Options menu to display/hide certain parts of the editor.<br />
<span id="more-609"></span><br />
Here&#8217;s the screenshot of the Screen Option<br />
<a href="http://kwatog.com/wp-content/uploads/2011/07/wordpress_missing_custom_fields1.jpg"><img src="http://kwatog.com/wp-content/uploads/2011/07/wordpress_missing_custom_fields1-300x98.jpg" alt="" title="wordpress_missing_custom_fields1" width="300" height="98" class="alignnone size-medium wp-image-610" /></a><br />
<a href="http://kwatog.com/wp-content/uploads/2011/07/wordpress_missing_custom_fields.jpg"><img src="http://kwatog.com/wp-content/uploads/2011/07/wordpress_missing_custom_fields-300x80.jpg" alt="" title="wordpress_missing_custom_fields" width="300" height="80" class="alignnone size-medium wp-image-611" /></a></p>
<p>I think that menu has been there for the longest time and I&#8217;m pretty sure that I&#8217;ve used that at least once if I can remember correctly. So now, I&#8217;m taking a note of it.</p>
<h4>Incoming search terms:</h4><ul><li>custom fields wordpress 3 2</li><li>wordpress 3 2 custom fields</li><li>custom fields in wordpress 3 2</li><li>wordpress 3 2 add custom field</li><li>ativar custom field wordpress 3 2</li><li>where is custom fields wordpress 3 2</li><li>wordpress 3 2 add custom fields</li><li>wordpress 3 2 how to show custom fields</li><li>wordpress 3 2 missing option custom content</li><li>wordpress custom fields 3 2</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/missing-custom-fields-on-wordpress-3-2/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Automatically Convert Emails to NoSpam</title>
		<link>http://kwatog.com/blog/wordpress/automatically-convert-emails-to-nospam/</link>
		<comments>http://kwatog.com/blog/wordpress/automatically-convert-emails-to-nospam/#comments</comments>
		<pubDate>Wed, 18 May 2011 15:28:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=549</guid>
		<description><![CDATA[To prevent spam comments on one of the sites that I maintain, I send for approval any comment with at least one URL or email address in it. In that way, manual spammers will find no incentive on leaving comments on the site. At the same time, email addresses left by commenters will not be [...]]]></description>
			<content:encoded><![CDATA[<p>To prevent spam comments on one of the sites that I maintain, I send for approval any comment with at least one URL or email address in it. In that way, manual spammers will find no incentive on leaving comments on the site. At the same time, email addresses left by commenters will not be displayed in the site until it is sanitized. However, the amount of comments in the site in question is so many and manually sanitizing comments with emails is becoming a pain.<br />
<span id="more-549"></span><br />
So I decided to write a hook to filter the comments and auto-convert the emails into NoSpam format. That is, replacing the @(at sign) and . (dot) in the email. So here&#8217;s the purpose of this auto-conversion.</p>
<ol>
<li>auto-approve legitimate comments even if it has emails in it</li>
<li>prevent email scrapers from harvesting email addresses left by the commenters</li>
<li>send for manual approval any comment with one or more URL other than emails</li>
</ol>
<p><!--more--><br />
Just place the code below anywhere on your template&#8217;s functions.php.<br />
<code><br />
function Kwatog_NoSpamEmail($text){<br />
    $pattern = '/([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])'.'(([a-z0-9-])*([a-z0-9]))+'.'(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+/i';<br />
	preg_match_all($pattern, $text, $emails);<br />
	$symbols = array("@", ".");<br />
	$safeChars = array("[at]", "[dot]");<br />
    foreach ($emails[0] as $email){<br />
         $emailsafe = str_replace($symbols, $safeChars, $email);<br />
          $text = str_replace($email, $emailsafe, $text);<br />
	}<br />
    return $text;<br />
}</p>
<p>add_filter('comment_text','Kwatog_NoSpamEmail');<br />
add_filter('pre_comment_content', 'Kwatog_NoSpamEmail');<br />
</code></p>
<p>Here&#8217;s the sample output after I put in this code.<br />
<img src="http://kwatog.com/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-PM-11.43.31.png" alt="" title="NoSpam Email Auto Convert" width="660" height="163" class="alignnone size-full wp-image-550" /></p>
<p>The code is not actually foolproof but it will be able to trap 90% of the scenarios. Also, the auto-change is applicable for existing and new comments.</p>
<p>I have no intention as of this time to convert snippet into a WordPress plugin so feel free to create one if you feel like it.</p>
<h4>Incoming search terms:</h4><ul><li>emailsafe jquery</li><li>\ [a-z0-9][a-z0-9_-]*</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/automatically-convert-emails-to-nospam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Private File Attachments in WordPress</title>
		<link>http://kwatog.com/blog/wordpress/private-file-attachments-in-wordpress/</link>
		<comments>http://kwatog.com/blog/wordpress/private-file-attachments-in-wordpress/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 12:27:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=436</guid>
		<description><![CDATA[Before WordPress 3.0, I use codes from the plugin Private Files in one of client website to protect the files from illegal download/viewing. It works by not allowing access to WP&#8217;s uploads directory and sending and then serving a custom 404 page. It works fine until WordPress 3.0 started sending headers before calling the template&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Before WordPress 3.0, I use codes from the plugin <strong>Private Files</strong> in one of client website to protect the files from illegal download/viewing. It works by not allowing access to WP&#8217;s uploads directory and sending and then serving a custom 404 page. It works fine until WordPress 3.0 started sending headers before calling the template&#8217;s 404.php. This resulted to the plugin not generating the requested file. After so much googling, I found out that there&#8217;s a better way of doing it by using redirect in .htaccess. </p>
<p>Here&#8217;s my .htaccess placed on the /wp-content/uploads/ directory.<br />
<span id="more-436"></span><br />
<code><br />
IndexIgnore *<br />
Options +FollowSymlinks<br />
RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} !^<strong>http://(www\.)?kwatog\.com/ </strong>[NC]<br />
RewriteCond %{REQUEST_URI} !hotlink\.(<strong>gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx</strong>) [NC]<br />
RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx)$ http://www.kwatog.com/filenotexist.txt [NC]<br />
</code></p>
<p>What it does is that files will not be displayed if the referrer is not my own domain. It forces the user/visitor to click on the link to be able to view/download the file(only if the extension is any of those listed above). The checking is not case-sensitive (that&#8217;s what [NC] stands for).</p>
<p>Together with my custom codes for user access management, I was able to display and hide links based on the user profile. At the same time, search engines like Google will not be able to crawl and cache my files. So for me, it&#8217;s actually many birds in one stone and I didn&#8217;t even have to add another code on my themes and plugins (actually, I removed the custom 404). Just to be clear, I managed to get the following with this fix.</p>
<ol>
<li>Prevent Google from caching and viewing my files</li>
<li>Prevent hotlinking. That is, another site will use images stored on my server to display them on another website. Another thing is that files will not be served/viewed by simply pasting the URL/URI on the address bar.</li>
<li>Forcing the users to login before downloading/viewing files they own.</li>
<li>Prevent users from viewing other user&#8217;s files when they are logged in. This is achieved by not displaying the link to the files they do not own.</li>
</ol>
<p>Whew, that&#8217;s a lot! Unfortunately, it took me quite some time to find the solution. Actually, two nights of sleep was lost for this. And like many of the problems I&#8217;ve written before, the solution is so damn simple. By the way, the same can be implemented in NGINX (which I also use). Of course, you need to translate the directives.</p>
<p>Source : Unfortunately, I forgot where I got this but it&#8217;s somewhere in the WordPress.org forum. I&#8217;ll try to update the post once I find it again.</p>
<p>Note : The code is just a sample. It&#8217;s not actually running on this blog.</p>
<p>Ciao!</p>
<h4>Incoming search terms:</h4><ul><li>wordpress private files</li><li>file attachment wordpress</li><li>wordpress private downloads</li><li>private files wordpres</li><li>wordpress private uploads</li><li>wordpress private files manage</li><li>wordpress private files plugin</li><li>wordpress private file</li><li>wordpress share private files</li><li>wordpress plugin files private</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/private-file-attachments-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WP MultiSite : Error Connecting to Database</title>
		<link>http://kwatog.com/blog/wordpress/wp-multisite-error-connecting-to-database/</link>
		<comments>http://kwatog.com/blog/wordpress/wp-multisite-error-connecting-to-database/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 09:30:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NGINX]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=428</guid>
		<description><![CDATA[I searched the interwebs and the solutions I found are mostly solving a different problem. To be specific, the problem being solved is about the WordPress MU migrated to WordPress MultiSite. Another problem raised that gets this message is about plugins incompatible with the MultiSite. Of course, you only need to disable those plugins. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I searched the interwebs and the solutions I found are mostly solving a different problem. To be specific, the problem being solved is about the WordPress MU migrated to WordPress MultiSite. Another problem raised that gets this message is  about plugins incompatible with the MultiSite. Of course, you only need to disable those plugins. </p>
<p>Here&#8217;s the case I have.<br />
Server Setup<br />
Type : VPS<br />
WebServer : nginx-0.8.51<br />
WP Version : WP 3.0.1 multisite enabled<br />
Plugins Installed : NONE<br />
Problem Description :<br />
After adding new blogs on my multisite installation, the error below</p>
<blockquote><p>
&#8216;Error establishing a database connection<br />
This either means that the username and password information in your wp-config.php file is incorrect or we can&#8217;t contact the database server at localhost. This could mean your host&#8217;s database server is down.&#8217;
</p></blockquote>
<p>Additional Detail : The main site is accessible without any problem. The admin dashboard is configurable. So the message that there&#8217;s a problem with the login credentials is simply not true.<br />
<span id="more-428"></span></p>
<h3>The Solution</h3>
<p>It&#8217;s one of those &#8220;too simple why I did not think about that&#8221; cases. I had to change the ownership of the wp-content folder to the nginx user.<br />
<code><br />
chown -R nginx:nginx /var/www/domain.com/wp-content<br />
</code><br />
Viola! The problem is solved. The issue here is that when you create a new blog and your webserver (in my case, nginx) cannot write into the wp-content folder (specifically on blogs.dir), WordPress does not throw the correct error message leaving you cold in the dark. I&#8217;m not sure if there&#8217;s already a bug reported for this. But anyhow, I&#8217;ll try to figure out how to report a bug. </p>
<p>If in case you don&#8217;t want the webserver user(i.e, nginxuser) to own the folder, you can at least add nginxuser to the group that owns the folder and make the folder group writable (664 or 775).<br />
<code><br />
usermod -G usergroup nginxuser<br />
chmod -R 664 /var/www/domain.com/wp-content<br />
</code> </p>
<h4>Incoming search terms:</h4><ul><li>wordpress multisite Error establishing a database connection</li><li>Error establishing database connection wordpress multisite</li><li>wordpress multisite error establishing database connection</li><li>Error establishing a database connection wordpress multisite</li><li>Error establishing a database connection multisite</li><li>wordpress multisite database error</li><li>error establishing database connection multisite</li><li>multisite error establishing a database connection</li><li>multisite wordpress error establishing database</li><li>wordpress multisite error connecting to database</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/wp-multisite-error-connecting-to-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change WordPress Table Prefix</title>
		<link>http://kwatog.com/blog/wordpress/change-wordpress-table-prefix/</link>
		<comments>http://kwatog.com/blog/wordpress/change-wordpress-table-prefix/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 14:18:27 +0000</pubDate>
		<dc:creator>kwatog</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. [...]]]></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>
<h4>Incoming search terms:</h4><ul><li>table prefix home pl</li><li>wordpress tagged with prefix</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/change-wordpress-table-prefix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 404 Page Not Working in IE</title>
		<link>http://kwatog.com/blog/wordpress/wordpress-404-page-not-working-in-ie/</link>
		<comments>http://kwatog.com/blog/wordpress/wordpress-404-page-not-working-in-ie/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 11:40:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=352</guid>
		<description><![CDATA[As stated in the title, my 404 template in WordPress does not show up every time a non-existent URL is accessed in my site. The page works perfectly in FireFox and Chrome, though. So I made a quick search and found that the solution is to add another header information in the page. So here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>As stated in the title, my 404 template in WordPress does not show up every time a non-existent URL is accessed in my site. The page works perfectly in FireFox and Chrome, though. So I made a quick search and found that the solution is to add another header information in the page. So here&#8217;s what to insert at the very start of <strong>404.php</strong>.</p>
<p><code><br />
&lt;?php ob_start(); ?&gt;<br />
&lt;?php header("HTTP/1.1 404 Not Found"); ?&gt;<br />
</code></p>
<p>For this, credit goes to wpcanada.<br />
<a href="http://wpcanada.ca/2008/03/20/ie-and-custom-error-pages/">http://wpcanada.ca/2008/03/20/ie-and-custom-error-pages/</a></p>
<p><span id="more-352"></span><br />
This is also touched in weblogtoolscollection.com at http://weblogtoolscollection.com/archives/2004/07/31/gzip-compression-issue-in-wordpress-12-mingus/</p>
<p>Note: ob_start() is a PHP function Turn on output buffering&#8230; whatever that means. <img src='http://kwatog.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<h4>Incoming search terms:</h4><ul><li>header(\HTTP/1 1 404 Not Found\); not working wordpress</li><li>ie 404 page</li><li>ob_start header 404</li><li>wordpress 404 internet explorer</li><li>wordpress 404 on ie not on firefox</li><li>wordpress 404 php not working</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/wordpress-404-page-not-working-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Category Name in WordPress</title>
		<link>http://kwatog.com/blog/wordpress/get-category-name-in-wordpress/</link>
		<comments>http://kwatog.com/blog/wordpress/get-category-name-in-wordpress/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:03:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=228</guid>
		<description><![CDATA[This is another super simple and yet super helpful WordPress function that took me a while to find. I&#8217;m currently working on a WP Theme that requires me to show the category name. And I thought it isn&#8217;t right to write an SQL including all the necessary stuffs that comes with querying the database just [...]]]></description>
			<content:encoded><![CDATA[<p>This is another super simple and yet super helpful WordPress function that took me a while to find. I&#8217;m currently working on a <em>WP Theme</em> that requires me to show the category name. And I thought it isn&#8217;t right to write an SQL including all the necessary stuffs that comes with querying the database just to get the category name. There must be a simpler and better way&#8230; and there is! Here&#8217;s the simple code to do just that.</p>
<p><code><br />
 &lt;?php get_cat_name( $cat_id );  ?&gt;<br />
</code></p>
<p>Cool!</p>
<p>Reference: http://codex.wordpress.org/Function_Reference/get_cat_name</p>
<h4>Incoming search terms:</h4><ul><li>get_category_name</li><li>wp get_category_name</li><li>get_category_name wordpress</li><li>get category name wordpress</li><li>wp get category title</li><li>wp get category name</li><li>wordpress sql category name</li><li>wordpress get the category title</li><li>the_category_name</li><li>get_category_title wordpress</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/get-category-name-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress : ‘You do not have sufficient permissions to access this page’</title>
		<link>http://kwatog.com/blog/wordpress/wordpress-you-do-not-have-sufficient-permissions-to-access-this-page/</link>
		<comments>http://kwatog.com/blog/wordpress/wordpress-you-do-not-have-sufficient-permissions-to-access-this-page/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:24:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[access this page]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[insufficient permissions]]></category>
		<category><![CDATA[plugins]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=175</guid>
		<description><![CDATA[The problem looks like below. You do not have sufficient permissions to access this page The supposed permission problem has occured before and mainly involves plugins. For older version of wordpress, your problem may be solved by one or both of the Change of table prefix - I suggest you visit this to solve that [...]]]></description>
			<content:encoded><![CDATA[<p>The problem looks like below.</p>
<blockquote><p>
You do not have sufficient permissions to access this page
</p></blockquote>
<p>The supposed permission problem has occured before and mainly involves plugins. For older version of wordpress, your problem may be solved by one or both of the </p>
<ul>
<li><strong>Change of table prefix -</strong> I suggest you visit <a href="http://beconfused.com/2007/08/28/how-to-solve-you-do-not-have-sufficient-permissions-to-access-this-page-in-wordpress/">this</a> to solve that problem. And it also solves a string of other things, too.
</li>
<li><strong>Failed Upgrade -</strong> If you used an automatic upgrade and failed, it is possible that the version number saved in the database is already updated. You can force upgrade it by updating the your version number. Another alternative is by using MarkAquit&#8217;s script <a href="http://markjaquith.wordpress.com/2006/03/28/wordpress-error-you-do-not-have-sufficient-permissions-to-access-this-page/">here</a></li>
</ul>
<p>However, these solutions are only applicable for older versions of WordPress. If you have a clean install, you should not encounter this. That&#8217;s why it didn&#8217;t work and was back to square one of investigation. Upon further checking, it turned out that the problem is related to old plugins. Apparently, there are plugins that was written before the current releases and whose parts of the code is no longer compliant with the current version of WordPress. </p>
<p>Finding the offending plugin is a bit tricky especially if you are using a lot of plugins. Luckily, I only encounter this in a contact page plugin and replace it accordingly with a new plugin which was released lately. The problem with my older plugin is that there&#8217;s no more active development. And so when some of the codes were deprecated, the plugin fails.</p>
<p>So what&#8217;s the problem then? Old Plugins. </p>
<h4>Incoming search terms:</h4><ul><li>wordpress plugins You do not have sufficient permissions to access this page</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/wordpress/wordpress-you-do-not-have-sufficient-permissions-to-access-this-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--
Hyper cache file: 06c05add8ff641e6303beb8a43cc35be
Cache created: 04-02-2012 09:19:47
HCE Version: 0.9.8
Load AVG: 0.24(5)
-->
