How to: Fix XML Parsing Error of WordPress Feed

AIM- “To fix error on line 2 at column 6: XML declaration allowed only at the start of the document”

Scenario – WordPress Feeds

Situation – Error



Symptom –  Due to whitespace before the beginning line of xml feed.

Problem – Either due to extra space after closing tag ?> in functions.php of your WordPress theme file.

Simple Fix (1 hour fix)- Try deactivating your theme and check your blog.com/rss  for no more errors. If no error then theme is causing you the problem. So either find the whitespace in your php file and remove it. If it it not in functions.php, the error might be from any of the theme files.

Very very simple fix (1 minute fix)Add the following code to your functions.php of your theme.

function ___juniorhero_wp_whitespace_fix($input) {
	/* valid content-type? */
	$allowed = false;

	/* found content-type header? */
	$found = false;

	/* we mangle the output if (and only if) output type is text/* */
	foreach (headers_list() as $header) {
		if (preg_match("/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i", $header)) {
			$allowed = true;

		if (preg_match("/^content-type:\\s+/i", $header)) {
			$found = true;

	/* do the actual work */
	if ($allowed || !$found) {
		return preg_replace("/\\A\\s*/m", "", $input);
	} else {
		return $input;


Once you add the above code, boom the xml parsing error is gone. Enjoy your blogging days.

WordPress Fix “You do not have sufficient permissions to access this page”

Fix for WordPress “You Do Not Have Sufficient Permissions to Access This Page”


So you’ve created a local installation of your WordPress site. Now you have the WordPress “You do not have sufficient permissions to access this page” error.  Over and over no matter what you try. UGH!

There are dozens of blog posts with excellent solutions to this problem. But if you’ve been at WordPress for any length of time, you’ve probably discovered that  many of the hacks and tweaks that work for others just don’t fix your problem. It’s happened to me, too few days back. It is a weird situation when the admin itself is not allowed to access WordPress Admin Panel.


I tried many ways but still I got the error. But no matter what I did, I kept getting the dreaded WordPress “You do not have sufficient permissions to access this page.” I knew it was a database permissions problem, but I just couldn’t get the right combinations of tweaks to work. The problem turned out to be incomplete WordPress admin user data because of corrupt tables.

I finally came up with the manual procedure that fixed my particular problem. Those troubleshooting steps are listed

But first, you might want to try using a different browser. A reader recently posted that he was getting this error with Firefox but was able to access his site using a different browser. Browser caching can definitely cause problems like this, so it’s a great tip to try first.

This error occurs if you moved your site or changed your WordPress table prefix

If that doesn’t help, enter the following SQL commands in your PHPmyAdmin to get back your access

UPDATE `wp_usermeta` SET `meta_key` = replace(`meta_key`, 'wp_test_', 'wp_');
UPDATE `wp_options` SET `option_name` = replace(`option_name`, 'wp_test_', 'wp_');


here the wp_test_ is your old WordPress table Prefix  and wp_ is your new WordPress Prefix.


Feel free to say thanks by dropping a comment below

How to Fix White Screen of Death WordPress

There are a few situations which can cause a WordPress installation bringing about the white screen of death. Much of the time we’ve seen as such, the white screen of death is not a WordPress issue, yet something else, for example, a plugin separating the WordPress blog.


We have encountered the white screen of death and how we troubleshooted it is through a unique way. First of all get FTP/SSH access to your WordPress Installation directory.


  1. Then rename wp-content/plugins directory to wp-content/plugin or something else. Now try reloading the site, if it works, a plugin is causing the problem. So enable the plugins one or two at a time and find which plugin is causing the problem and either remove it or get a new copy of plugin from wordpress repository.
  2. If no change occurs when renaming wp-content/plugins, rename the same with wp-content/themes and check. If still no change occurs, have a look on wp-config.php
  3. If you did a server change or changed the table prefix, then the white screen error is due to table change. Either create a new wordpress installation and copy data only of the below tables


WordPress Plugins Easy to Install Bookmarklet

WordPress is the most popular blogging software. Over 25 million people uses WordPress to run their blogs. It is the best Open Source CMS and has bagged numerous awards. Everyday thousands of newbies are using WordPress not just to run blogs but entire sites and portals. ‚ Matthew Mullenweg founded Automattic and created the delightful WordPress leading to the formation of ‘Blogging Industry’. Even CNN, The New York Times, NASA, Harvard University uses WordPress to power their portals.

WP 3.0 has been downloaded 16 million times. WordPress plugin directory has nearly 12,000 plugins and over 120 million plugin downloads. There are about 1000 themes and 22 million theme downloads.

How to install a WordPress plugin?

Traditional way of installing ‚ a WP plugin.

  1. Find the Plugin.
  2. Download the WP plugin.
  3. Upload it to /wp-content/plugins.
  4. Activate it.
  5. Configure it and see if the plugin is working or not.

Advantage: Search is effective and it is easy to find plugins.

Limitation: You must be an advanced user and it consumes a lot of time, and often messes up.

WP built-in way of installing a Plugin.

  1. Go to WP-admin -> Plugins -> Add New -> Search.
  2. Search the plugin.
  3. Install the Plugin.

Advantage: Find and add plugins directly from your WP-admin panel.

Limitation: Rarely it works, root of server needs to be writable and ‚ search is not effective like the search in the WP-plugins directory.

So both the Traditional and inbuilt WordPress plugin installation methods has its own advantages and disadvantages. There is a bookmarklet which is a combination of advantages of traditional and inbuilt method .

New way of installing a WP plugin.

  1. Drag the bookmarklet from the following page to your bookmarks bar:Install WP Plugin.
  2. Browse plugins on WordPress Plugin Directory.
  3. Go to the main page of the plugin eg:Akismet.
  4. Click on the Bookmarklet.
  5. Automatically, this tool appears with options – Plugin Slug and WordPress URL”. Enter your WordPress directory url eg:http://juniorhero.com.

  1. Click on “Install” Plugin.
  2. A page with the details of plugin appears. Click on “Install Now”.

Developer View of this bookmarklet.

It creates a url like: http://coveredwebservices.com/wp-plugin-install/?plugin=akismet where akismet is the slug of plugin in the WP plugins directory.

This is the easiest and fastest way to install WordPress plugins without ever getting messed up and knowing much about WordPress Plugin installation. This bookmarklet is very useful for web developers and coders as it helps to add plugins very quickly according to the taste of the client.

Add the bookmarklet : Install WP Plugin and Enjoy.

Do let us know which method do you use normally to install plugins? Tell us whether this wordpress bookmarklet is useful to you?

[WORKING] How to Remove WordPress Category Base

Are you just another frustrated blogger who want to remove the unwanted /category/ base from your WordPress blog? If yes, you don’t have to waste hours trying to remove it with .htaccess which messes up when we add buggy and weird codes.

I see this is a popular unsolved question in the Blogosphere.There are millions of pages who wrote on the same topic with .htaccess non-working codes and many WordPress plugins which made errors including serious 404 pages for available pages.

The main problems which made this an unsolved WordPress issue are

  • Too Complex editing of .htaccess and redirection plugins
  • So much SEO issues.
  • Buggy and non-working WP plugins.
  • Contributors edited the plugins and made more fatal errors.
  • Un-updated and non-compatible WP plugins.
  • The primary category base killer plugin screws up with other plugins.

Messed Up While Coding


I believe only few bloggers have managed to remove the category base from their blogs. They might have hired web coders or could be a web developer himself. I checked many ProBloggers and Popular Bloggers who write about SEO but none of them has managed to remove the /category/ part from their WordPress blog.

I am quite happy to showcase the plugin I found by googling. Even I Googled the same thing numerous times, but I couldn’t find this plugin. Yesterday it caught my eyeball attention. You are lucky enough that I found a solution for your common problem. If you can’t believe this, you can see it live on Juniorhero.

No Category Parents WordPress Plugin


No Category Parents is a WordPress plugin which hadn’t got any coverage on the web yet. This plugin will completely remove “Category Base” from your WordPress permalinks. It automatically redirects and rewrites all urls to the new url. It changes your “/category/name/” to “/name/”.

Installation is quite simple. Simply upload to /wp-content/plugins/ in your WordPress installation folder and activate it.

Download the WordPress plugin: No Category Parents

If PHP generates your categories list,you don’t have to do anything. But if you have manually linked category urls in your blog, you need to change it to the format without “category/” in the link.

Thus we can remove the category base from your WordPress blog.

Please do tell me If it does not work. We welcome your replies. If you have any WordPress or Blog related problem, Just drop a comment, I will solve it. Happy Blogging.