<?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>I Like WordPress! &#187; Troubleshooting WordPress issues</title>
	<atom:link href="http://ilikewordpress.com/category/troubleshooting-wordpress-issues/feed/" rel="self" type="application/rss+xml" />
	<link>http://ilikewordpress.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 06 Sep 2010 21:21:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Loading WordPress From index.php</title>
		<link>http://ilikewordpress.com/274/loading-wordpress-from-index-php/</link>
		<comments>http://ilikewordpress.com/274/loading-wordpress-from-index-php/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 16:31:13 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[On WordPress]]></category>
		<category><![CDATA[PHP goodies]]></category>
		<category><![CDATA[Troubleshooting WordPress issues]]></category>
		<category><![CDATA[WordPress plugins]]></category>
		<category><![CDATA[duplicate content]]></category>
		<category><![CDATA[index files]]></category>
		<category><![CDATA[url rewriting]]></category>
		<category><![CDATA[wordpress redirect]]></category>

		<guid isPermaLink="false">http://ilikewordpress.com/?p=274</guid>
		<description><![CDATA[One of WordPress&#8217; strengths is its attention to SEO-related issues in its core files. One of those issues is the problem of having the home page of the blog indexed twice in the search engines; once under the actual address, http://domain-name.com/index.php, and the other as the plain domain name: http://domain-name.com. Note that this is a [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<div><a href='http://twitter.com/home?status=Loading+WordPress+From+index.php+http://is.gd/359Fo+from:+@steveinidaho'><img class='tweetbadge alignright' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/ts-png.php?count=176' alt='' /></a></div>
<p>One of WordPress&#8217; strengths is its attention to SEO-related issues in its core files. One of those issues is the problem of having the home page of the blog indexed twice in the search engines; once under the actual address, <strong><span style="color: #e7847e;">http://domain-name.com/index.php</span></strong>, and the other as the plain domain name: <strong><span style="color: #e7847e;">http://domain-name.com</span></strong>. Note that this is a different problem than the trailing slash problem ( <strong><span style="color: #e7847e;">http://domain-name.com/</span></strong> vs. <strong><span style="color: #e7847e;">http://domain-name.com</span></strong> ) which WordPress also takes care of.</p>
<p>WordPress handles the index.php problem by rewriting requests for <strong><span style="color: #e7847e;">http://domain-name.com/index.php</span></strong> to <strong><span style="color: #e7847e;">http://domain-name.com</span></strong>. All well and good, and beneficial for most sites.</p>
<p>But that rewriting/redirecting caused some problems on a site I was working on yesterday, and once I figured out how, it was a relatively easy fix.<span id="more-274"></span></p>
<p>Here&#8217;s what happened: a client had me upgrade an old installation of SemioLogic&#8217;s version of WordPress to genuine WordPress. While it can be time-consuming, switching over is a fairly straightforward process most of the time. The challenge here was that while most of the site is normal .html files, WordPress is installed at the root level, and is not actually serving the &#8216;home&#8217; page of the site.</p>
<p>So you can maybe see where this is headed: the &#8216;home&#8217; page of the site is index.html. That&#8217;s what comes up when you ask for <strong><span style="color: #e7847e;">http://domain-name.com</span></strong>. The server is set to look for index.html <strong>first</strong>, then index.php if index.html isn&#8217;t there. So to get to the blog, you had to ask for <strong><span style="color: #e7847e;">http://domain-name.com/index.php</span></strong>.</p>
<p>But when you asked for index.php, WordPress, being the dutiful SEO-friendly software that it is, stripped off &#8220;index.php&#8221; from the request, and redirected to <strong><span style="color: #e7847e;">http://domain-name.com</span></strong>.</p>
<p>The server saw the request for the site index file and promptly served up index.html. So you couldn&#8217;t get to the home page of the blog. If you had a specific post URL and typed it in, it worked fine.</p>
<p>Easy fix, says I. Settings -&gt; General, change the WordPress url to <strong><span style="color: #e7847e;">http://domain-name.com/index.php</span></strong> from <strong><span style="color: #e7847e;">http://domain-name.com</span></strong>.</p>
<p>Oops. Now all the permalinks have &#8216;index.php/&#8217; prepended: <strong><span style="color: #e7847e;">http://domain-name.com/index.php/i-want-this-post</span></strong>. Not good, and not intended, especially as the site has been indexed in Google without the index.php in there.</p>
<p>I never did figure out how SemioLogic handled this; obviously it was working before the changeover. Undoubtedly there was an easy setting that disappeared once the SL files were gone. I can only think this issue had come up before and the author of SL provided a workaround.</p>
<p>Thankfully, the coders of WordPress also recognized that there may be a time when rewriting URLs wasn&#8217;t good so they provided a filter to disable or alter the rewrite. Once I found that notation in includes/canonical.php, the fix was a breeze. Write a plugin that disables the redirect to / when /index.php is called for. Here is the entire plugin:</p>
<pre class="brush: php;">
&lt;?php
/*
Plugin Name: Index.php fix
Plugin URI: http://ilikewordpress.com/loading-wordpress-from-index-php
Description: This plugin allows a blog installed at root to be addressed by /index.php. Remedies stripping of filename by includes/canonical.php
Author: Steve Johnson
Version: 1.0
Author URI: http://ilikewordpress.com/
*/

/*
*    Applies filter to redirect_canonical to defeat
*    stripping of index.php file
*/

function fix_index( $requested_url ) {
 if ( get_bloginfo( 'url' ) == $requested_url )
 return false;
}
add_filter( 'redirect_canonical', 'fix_index' );

?&gt;
</pre>
<p>And that&#8217;s all there is to it. Now when a browser asks for &#8216;index.php&#8217;, that&#8217;s what it gets instead of a redirection to /.</p>
<p>You could also put this in the functions.php file of a theme, but obviously it wouldn&#8217;t work if the theme were changed.</p>
<div class='tweetbacks'><img style='padding-right: 5px;' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/twitter.png' alt='' width='20' /><strong>176 Total TweetBacks:</strong> (<a href='http://twitter.com/home?status=Loading+WordPress+From+index.php+http://is.gd/359Fo+from:+@steveinidaho'>Tweet this post</a>) </div>]]></content:encoded>
			<wfw:commentRss>http://ilikewordpress.com/274/loading-wordpress-from-index-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Help! My WordPress Isn&#8217;t Working!</title>
		<link>http://ilikewordpress.com/57/help-my-wordpress-isnt-working/</link>
		<comments>http://ilikewordpress.com/57/help-my-wordpress-isnt-working/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 13:33:20 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Troubleshooting WordPress issues]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://ilikewordpress.com/?p=57</guid>
		<description><![CDATA[Here&#8217;s a quick tip for you &#8212; if some function in the WordPress Dashboard (especially WP v2.7) isn&#8217;t working for you, or if you make some changes to your WordPress theme and you&#8217;re not seeing them on your live site, clear your browser cache! This one simple thing can solve a number of problems for [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<div><a href='http://twitter.com/home?status=Help%21+My+WordPress+Isn%27t+Working%21+http://is.gd/oAA6+from:+@steveinidaho'><img class='tweetbadge alignright' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/ts-png.php?count=6' alt='' /></a></div>
<p>Here&#8217;s a quick tip for you &#8212; if some function in the WordPress Dashboard (especially WP v2.7) isn&#8217;t working for you, or if you make some changes to your WordPress theme and you&#8217;re not seeing them on your live site, <em><strong>clear your browser cache</strong><strong>!</strong></em></p>
<p>This one simple thing can solve a number of problems for you. Browsers are weird animals. In the name of speed, they cache (store on your local computer) many of the files and images that make up a web page. Sometimes it doesn&#8217;t know when to ask for new files from the web server of the site you&#8217;re visiting.</p>
<p>If you&#8217;re on Windows and you&#8217;re using Internet <span style="text-decoration: line-through;">Exploder</span> &#8230; er, Explorer &#8230; go to Tools &gt;Internet Options and click on the Delete button in the &#8216;Browsing history&#8217; section. In the dialog box that opens, click the &#8216;Delete files&#8230;&#8217; button in the &#8216;Temporary Internet Files&#8217; section. Follow the prompts to delete the files. Close and restart IE.</p>
<p>If you&#8217;re using Firefox (and you should be!) click on Tools then Clear Private Data (or hold down ctrl and shift and hit delete). In the dialog box, clear all of the checkboxes except &#8216;Cache&#8217; and click OK. Close and restart Firefox.</p>
<p>Do it twice! Only the browser gremlins know why, but I&#8217;ve found that sometimes once isn&#8217;t enough to completely clear the cache files.</p>
<div class='tweetbacks'><img style='padding-right: 5px;' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/twitter.png' alt='' width='20' /><strong>6 Total TweetBacks:</strong> (<a href='http://twitter.com/home?status=Help%21+My+WordPress+Isn%27t+Working%21+http://is.gd/oAA6+from:+@steveinidaho'>Tweet this post</a>) </div>]]></content:encoded>
			<wfw:commentRss>http://ilikewordpress.com/57/help-my-wordpress-isnt-working/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You Don&#8217;t Have Permission To Do That</title>
		<link>http://ilikewordpress.com/47/you-dont-have-permission-to-do-that/</link>
		<comments>http://ilikewordpress.com/47/you-dont-have-permission-to-do-that/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 23:04:58 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Troubleshooting WordPress issues]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[file permissions]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[support forums]]></category>

		<guid isPermaLink="false">http://ilikewordpress.com/?p=47</guid>
		<description><![CDATA[Website security is critical, on that I&#8217;m sure we&#8217;d all agree. But it can sure be a pain in the ass sometimes. Can I hear a &#8220;hell YEAH!&#8221;? So what do you do when WordPress tells you, &#8220;You don&#8217;t have permission to do that&#8220;? Or when in some fashion you see a message that WordPress [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<div><a href='http://twitter.com/home?status=You+Don%27t+Have+Permission+To+Do+That+http://is.gd/ovpf+from:+@steveinidaho'><img class='tweetbadge alignright' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/ts-png.php?count=3' alt='' /></a></div>
<p>Website security is critical, on that I&#8217;m sure we&#8217;d all agree.</p>
<p>But it can sure be a pain in the ass sometimes. Can I hear a &#8220;hell YEAH!&#8221;?</p>
<p>So what do you do when WordPress tells you, &#8220;<strong>You don&#8217;t have permission to do that</strong>&#8220;? Or when in some fashion you see a message that WordPress is &#8220;<strong>Unable to create directory &#8211; Is its parent directory writable by the server?</strong>&#8221;</p>
<p>If you&#8217;re not geekily inclined, you call in a professional. Like me. Who&#8217;s supposed to know everything about WordPress.</p>
<p>So when I was hit with both of these today on my own blog, I did what any experienced professional troubleshooter does &#8212; look for the complicated causes first. I mean, <em>this can&#8217;t be something easy</em>, right?</p>
<p>The first error I hit was when trying to add a new category during a post. Little red box says, &#8220;You don&#8217;t have permission to do that&#8221;. Wonderful. Well, I know I do. At least I think I do. So in true spirit of a troubleshooting professional, I open a new tab and look into the options table of the database <em>because this can&#8217;t be anything simple</em>. Yeah, everything looks right. So what&#8217;s the problem? Do I need to reinstall? (I really didn&#8217;t consider that, but for some people at the first sign of trouble, that&#8217;s what they do)</p>
<p>Well, poo. I guess the next step is to close the browser, clear the cache, and try again.</p>
<p>Hit the &#8216;Save Draft&#8217; button on the post, it saves and reloads. The error goes away. What the hell, I&#8217;ll try again.</p>
<p>No errors, category added.</p>
<p>Ajax really chaps my ass sometimes&#8230;</p>
<p>So I finish up the post, and decide I want to add a plugin or two and I&#8217;ll play with the new search/auto-install features. I&#8217;m not a fan of auto-install. But I&#8217;m willing to work with it, because my clients are going to and I&#8217;d better know what&#8217;s up with it.</p>
<p>I find a plugin I want through the search feature, hit the install buttons and everything works flawlessly. Surprised? Hell yeah! It worked!</p>
<p>I knew of a plugin I wanted to install that isn&#8217;t in the <a title="WordPress Plugin Repository" href="http://wordpress.org/extend/plugins/">WordPress plugins repository</a>. I had a zip file on my machine, so I thought I&#8217;d try the &#8220;upload zip file and install&#8221; functionality. Hit the button, locate the file, hit continue&#8230;</p>
<p>Ha! There it was! I knew it! I knew it wouldn&#8217;t work. Where I was supposed to be seeing the sucess messages I was instead presented with &#8220;<strong>Unable to create directory &#8211; Is its parent directory writable by the server?</strong>&#8221;</p>
<p>This is an error that has to do with permissions on files, and folders. I <em><strong>KNOW </strong></em>those were set right, because I set up my own blogs. I know what I&#8217;m doing (tongue firmly planted in cheek here). So after going through all of the file permissions just do double-check (FYI, necessary <a title="WordPress installation file permissions" href="http://codex.wordpress.org/Changing_File_Permissions">file permission settings are here</a>), I started looking for more simple solutions.</p>
<p>Mod_security. &#8220;That&#8217;s the trouble,&#8221; I thought (mod_security is an Apache web server module designed to help keep the rifraff off of your server). <a title="What to do when mod_security is giving you gray hairs" href="http://wordpress.org/support/topic/164999">That module has been a pain in my butt</a> ever since WordPress start using the Flash-based uploader. Same sort of problems. That has to be the cause.</p>
<p>Nope. I&#8217;d already fixed that.</p>
<p>I wish I could say that I figured it out on my own. I suppose I would&#8217;ve, eventually. But fortunately Mr. Google had the answer, in the form of <a title="WordPress Support Forums" href="http://wordpress.org/support/topic/176212">this conversation on the WordPress support forums</a>.</p>
<p>What it finally boiled down to was a file path on the Settings &gt; Miscellaneous page was wrong. WordPress had divined and preloaded the supposedly correct path to my uploads folder. What <em>should </em>have been in the box is <em>wp-content/uploads</em>. What was <em>actually there</em> was the full server path to the uploads folder, prefixed with a slash. The slash is what was causing the problem. On its face it looked correct (*nix file paths are normally notated with a beginning slash), but in this case it wasn&#8217;t. Removing the slash cured the problem.</p>
<p>Moral of this rather long story? Look for the easy solutions first.</p>
<div class='tweetbacks'><img style='padding-right: 5px;' src='http://ilikewordpress.com/wp-content/plugins/tweetsweetr/twitter.png' alt='' width='20' /><strong>3 Total TweetBacks:</strong> (<a href='http://twitter.com/home?status=You+Don%27t+Have+Permission+To+Do+That+http://is.gd/ovpf+from:+@steveinidaho'>Tweet this post</a>) </div>]]></content:encoded>
			<wfw:commentRss>http://ilikewordpress.com/47/you-dont-have-permission-to-do-that/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
