I'm pretty new to Wordpress, so sorry if this is an obvious mistake :)

I've just moved a site from local installation on my computer to a live server. When I'm trying to install plugins or upgrade the Wordpress vs, I get this error message:

Could not open handle for fopen() to C:\Websites\Danabick-shanuniCoIL\site/wp-content/wordpress-3.tmp

It seems it still "thinks" it's a local installation.

I'm guessing I missed something when moving it, but not sure what.

Any help would be appreciated :)

edit: i tried searching the database for the problematic string, it's not there. if not the db, where can it be coming from?

  • 2
    export the database to an sql file and search that for C:\Websites
    – janw
    Commented Apr 23, 2012 at 7:32
  • This doesn't belong on Stack Overflow. I think the best place to ask instead would be the wordpress website.
    – Jasper
    Commented Apr 23, 2012 at 9:44
  • thnx, i wasn't aware of this.
    – AnnaC
    Commented Apr 29, 2012 at 11:41

4 Answers 4


Go to ur wp databse and seethe table wp_options there u will see site_url in id 1 change that link to your site link. if its the problem you will solve it otherwise there is something else -other idea to check where its causing problem or not is login to your wp-admin and check general under setting menu you will see the site url from there :). enjoy if this is you problem

  • i looked at the wp_options, it has the correct url there. i also searched the entire db, the problematic string isn't there.
    – AnnaC
    Commented Apr 29, 2012 at 11:39

When you move a WordPress database from one system to another there may be many links in the data that still point to the old installation. As pointed out above, the wp-options siteurl is the most critical. There is a plugin called wp-migrate-db that you use to create the dump that will fix up the vast majority of these and make migration much easier.


  • i tried to copy the database again using the plugin, works great, but didn't solve the problem :)
    – AnnaC
    Commented Apr 29, 2012 at 11:40

Even with a good migration plugin (BackupBuddy), I always meet some url/path issues.

The most effective way I found is do the migration with whatever tool you want (by hand, by plugin) and then running a search/replace.

But not any search/replace... it has to be serialized data enabled.

So after migrating, I use this php script (Search-Replace-DB) to adjust all paths and urls that weren't updated. Put it at your WP root, side by side with wp-config.php, and it'll grab the database info.

The URLs are not an issue.. as for the path: you'll have to search for C:\Websites\Danabick-shanuniCoIL\site/wp-content/ and replace with something like /home/your-user-name/public_html/wp-content/. And you can get this info dropping a simple php file at you WP root: <? echo $_SERVER['DOCUMENT_ROOT']; ?>

Of course, backup before any database operation of this kind.

[update] sorry, I just saw your comment in anstrangelAngel's answer saying that you've searched the entire DB. So, if the string is not in the DB it has to be in the theme, or less likely, in a plugin. Using a tool like Notepad++ or TextMate you can search your whole local WordPress directory for the string.

  • well, i ran a search on the db in phpmyadmin, guess if it didn't find it, it's not there (correct me if i'm wrong). it's probably something i messed up while working on the theme, since it's both related to plugins and wordpress update itself. i'll look in the files. any idea what files might those be specifically? :) thnx!
    – AnnaC
    Commented Apr 29, 2012 at 14:04
  • Well, you can swap to the twentyeleven and disable all plugins and see if the problem persists. As for searching the files, you need to search for the text string inside /plugins and /themes folder.
    – brasofilo
    Commented Apr 29, 2012 at 14:12
  • tried to change the theme to the original one and disabling the plugins - same error message... searched the folders, also no luck.
    – AnnaC
    Commented Apr 30, 2012 at 10:05

So, after I couldn't find the string in the db or the files, I looked at it again closely, and the path looked similar to what I have on the server. I guessed the c:/ wasn't referring to the local installation I had, but to the location on the server.

Talked to the hosting company, and apparently it was a permissions issue... (-facepalm-)

Problem solved :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.