We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Moved site on same server and lost all files in file manager and file upload prefs

Development and Programming

skodaminotti's avatar
skodaminotti
105 posts
8 years ago
skodaminotti's avatar skodaminotti

I have a subdomain “dev.” where the site was working fine. I then created a new subdomain on the same server called “staging” and copied all my site files from dev into that. I also created a new database for staging and imported everything from dev into that.

I followed the migration instructions as I always do, exactly. https://docs.expressionengine.com/v2/operations/moving.html

Updated all paths, etc. But for some reason, none of the images show on the site that were uploaded to directories. All of the images exist in their appropriate folders on “staging.”

However, there is nothing in my file upload preferences and nothing in my file manager. It’s as if everything disappeared.

If I try to recreate an upload directory in file upload prefs, i get this error “An Error Was Encountered The name of your directory is already taken.”

Also, when I looked in the exp_files table in the db, all the rel_paths still have the “dev” name associated with it.

I checked and re-checked everything, all my paths are correct in config, all of my directories have the correct permissions. I’m at a loss at this point.

EE 2.11.2 on a Windows Server.

I never work on a windows server with EE, but in this instance I had to. It has been nothing but a pain. Any help in the right direction is much appreciated at this point.

       
dwg-andy's avatar
dwg-andy
27 posts
8 years ago
dwg-andy's avatar dwg-andy

I know you said you went through everything regarding the migration instructions, but can you confirm if you added a config setting for each of your current upload locations?

$config['upload_preferences'] = array(
    1 => array(                                                            // ID of upload destination
        'name'        => 'Image Uploads',                          // Display name in control panel
        'server_path' => '/home/user/example.com/images/uploads/', // Server path to upload directory
        'url'         => 'http://example.com/images/uploads/'      // URL of upload directory
    )
);

I won’t say it’s the best solution by any means, but since you already know the name of each of your locations, perhaps this will be a work around to get things up and running?

       
skodaminotti's avatar
skodaminotti
105 posts
8 years ago
skodaminotti's avatar skodaminotti

I did, and after further diving I found that my exp_upload_prefs table was empty. That was the last table in my “staging” db. I checked my “dev” db and there was one more table after that “exp_wygwam_configs.”

I have a feeling the import of the db wasn’t 100% successful. So now I’m checking each table to see what else is missing. The problem is that we’ve already been making updates to content on staging so re-importing would only put me back a week or two on content.

What a nightmare.

Anyway, some of the images are showing up again, but some aren’t. I’ll probably have to go into each entry and relink what isn’t showing on the front-end.

       
dwg-andy's avatar
dwg-andy
27 posts
8 years ago
dwg-andy's avatar dwg-andy

oh man. yeah that’s a pickle. If it’s worth it to you, you may try a database merging tool like the one packaged with Toad. That way you can go item by item. That can take a real long time, but may be worth it.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.