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.
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?
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.