Archive for 'wordpress'

Home » wordpress

Solving the WordPress Error: Sorry, there has been an error. This does not appear to be a WXR file, missing/invalid WXR version number

Posted in: SysAdmin
  |  by: Wesley David
Tags: wordpress

My Problem

While performing the migration of my WordPress 3.3.1 blog, I used the “export” and “import” features to move my content. Upon trying to import the .xml file into my new WordPress installation that the export feature on the old installation had created, I hit upon this error:

Sorry, there has been an error.This does not appear to be a WXR file, missing/invalid WXR version number

My Solution

Downgrade to WordPress 3.2.x, perform the importation and then upgrade to the latest version.

Downgrading can take two forms: simply reinstalling WordPress from the ground up using an older version or taking the files of an older version and overwriting all existing 3.3.1 files with the exception of the wp-config.php file. Do not overwrite the wp-config file of the WordPress installation that you are trying to import into.

To find old versions of WordPress, visit the WordPress Release Archive. Make sure not to download one of the beta or release candidate files. Also, be aware if you’re site uses the MU version of WordPress. The files for MU installations are separate from the non-MU files.

Other Solutions

There are other possibilities as to why you cannot import your XML file.

The first is to look in the XML file and, near the top, add the line “<wp:wxr_version>1.1</wp:wxr_version>” (without quotes) just after the language definition declaration. For more information, see this WordPress Support thread.

Another possibility is that PHP safe_mode might be turned on and causing problems. safe_mode being on does not in itself guarantee that it is the cause of this problem, but it could be. You will need to contact your web host and ask if safe_mode is turned on. It is common for shared web hosts to enable it.



20FEB
0
Tweet

Fixing error “Unable to create directory” or “The uploaded file could not be moved to” in WordPress

Posted in: SysAdmin
  |  by: Wesley David
Tags: facepalm, web, wordpress

Someone I know was having issued with their WordPress installation. Since I’ve been using WordPress for ages (about ten days), I figured I’d have a look. Plus, I was the only one that he knew with technical experience. And his blog URL was printed in a periodical that was due to be shipped in two weeks, so expectations were running a little high. Sweet.

Every time an image was uploaded the following error was encountered:

Unable to create directory
/var/www/vhosts/domain.com/httpdocs/blog/wp-content/uploads.
Is its parent directory writable by the server?

I manually created the directory, and received a new error:

“The uploaded file could not be moved to /var/www/vhosts/domain.com/httpdocs/blog/wp-content/uploads”

After some sleuthing, it seemed to be an issue with PHP Safe Mode being enabled for the entire domain. There is a lot of differing opinions on how to address turning safe_mode off or even if you can turn it off for individual directories or not.

I’ll spare you the details, but let’s just say I got an unexpected self-taught crash course in PHP. After spending all morning on the issue, I ended up having the web host turn it off for the entire domain (something only they could do on the backend). The problem still persisted.

I came upon the answer after I changed the keywords I was using in Google. It’s so simple, I almost didn’t post it here. However, I am the Nubby Admin so it’s not like anyone has high expectations for me.

Solution:

First create the wp-uploads folder in the wp-content folder. Then change the permissions on wp-uploads to 777. I’m sure there are other possibilities, but that seemed to be the most straight-forward way.

Facepalm

Hopefully the search engines will smile on this post and save someone a morning of phpinfo() and ini_set().



12MAY
1
Tweet

Advertisements

Fixing error “Unable to create directory” or “The uploaded file could not be moved to” in WordPress
Fixing error “Unable to create directory” or “The uploaded file could not be moved to” in WordPress
Fixing error “Unable to create directory” or “The uploaded file could not be moved to” in WordPress
Fixing error “Unable to create directory” or “The uploaded file could not be moved to” in WordPress

Follow This Blog

Want to have these posts emailed to you? Enter your email address here. Google Feedburner takes care of the rest!

Delivered by FeedBurner

About Me!

Contact Me!

The Nubby Archives

  • [+] 2012 (43)
    • May (7)
    • Apr (11)
    • Mar (10)
    • Feb (8)
    • Jan (7)
  • [+] 2011 (73)
    • Dec (4)
    • Nov (7)
    • Oct (6)
    • Sep (11)
    • Aug (9)
    • Jul (6)
    • Jun (3)
    • May (1)
    • Apr (8)
    • Mar (5)
    • Feb (5)
    • Jan (8)
  • [-] 2010 (71)
    • Dec (6)
    • Nov (3)
    • Oct (4)
    • Sep (14)
    • Aug (2)
    • Jul (4)
    • Jun (14)
    • May (19)
    • Apr (5)

Be Social!

Circle me!





profile for WesleyDavid on Stack Exchange, a network of free, community-driven Q&A sites

Copyright © 2011
Top