Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Apr 25 '12 at 11:49

This question came from our site for professional and enthusiast programmers.

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

4 Answers

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

share|improve this answer
    
i looked at the wp_options, it has the correct url there. i also searched the entire db, the problematic string isn't there. –  Anna Apr 29 '12 at 11:39
add comment

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.

/peter

share|improve this answer
    
i tried to copy the database again using the plugin, works great, but didn't solve the problem :) –  Anna Apr 29 '12 at 11:40
add comment

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.

share|improve this answer
    
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! –  Anna Apr 29 '12 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 Apr 29 '12 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. –  Anna Apr 30 '12 at 10:05
add comment
up vote 0 down vote accepted

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 :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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