Build Your Own Business Website header image

Welcome to our Members Only Forum

You are welcome to view the content on our Forum, just scroll down to view this forum post.
If you like what you find and want to be able to post a question, please check out our subscription options.
Please feel free to search the forum using either the Google Site Search above or the forum search below.

Avatar
Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Media library not transferred to subdomain test site
Avatar
Azmat
Member
Members
Forum Posts: 41
Member Since:
November 9, 2011
sp_UserOfflineSmall Offline
1
November 14, 2012 - 8:27 am
sp_Permalink sp_Print

I created a copy of a live site to a subdomain following what Rick outlined in his video:

https://www.byobwebsite.com/seminars/wordpress/create-a-development-copy-of-your-live-wordpress-site-on-a-subdomain/

 

All my posts were transferred.  However my media library was not transferred.  As a result none of the feature images are showing up.

 

I'm using bluehost and created the subdomain inside the main site domain folder. 

 

sitename ->development 

 

The new url is development.sitename.com.  

 

The url of the images for the live site is sitename/wp-content/uploads/...

The url of the development site is being shown as : development.sitename/wp-content/uploads/...

The development site folder has all the images and content as the sitename folder

 

I am guessing there is an issue with the path name to the images.  I'd love some feedback on how I can easily fix this issue instead of re-uploading my images.  Thanks!

Avatar
Rick Anderson
Desert Hot Springs, CA
Admin
Forum Posts: 13637
Member Since:
November 8, 2009
sp_UserOfflineSmall Offline
2
November 14, 2012 - 8:34 am
sp_Permalink sp_Print

If you have hard coded urls to images or other assets that reference the development site name you'll need to change those urls.  Uploading new images won't necessarily solve the problem.

I've used the "Advanced Search and Replace" plugin successfully in the past for replacing URLs like that in the database.

Avatar
Azmat
Member
Members
Forum Posts: 41
Member Since:
November 9, 2011
sp_UserOfflineSmall Offline
3
November 14, 2012 - 8:52 am
sp_Permalink sp_Print

Thanks Rick.  The problem is that I don't see any images showing up in my media library for the development site.  

 

The old url to the images was sitename/wp-content/uploads/2012/10/image.jpeg

Now after the url change in the db, the url is development.sitename/wp-content/uploads/2012/10/image.jpeg  which returns an error.  And therefore the feature images are not being shown.

 

I see your point if I had hardcoded the urls and use a search and replace plugin to update the urls.  But shouldn't these images have transferred over once I copied the entire site and updated the url in the database (to development.sitename.com) ?  

 

Are you suggesting that I should replace all development.sitename/wp-content/uploads  references with sitename/wp-content/uploads ?

 

As you can tell I am a little confused by this.  Appreciate your feedback.  Thanks!

Avatar
Rick Anderson
Desert Hot Springs, CA
Admin
Forum Posts: 13637
Member Since:
November 8, 2009
sp_UserOfflineSmall Offline
4
November 14, 2012 - 9:19 am
sp_Permalink sp_Print

Yes If you copied your database and copied all of your site files then they should have transferred over.  WordPress doesn't rely on absolute urls for the media library, it uses relative urls.

If your media library is actually empty then the database didn't get copied properly.

If your media library shows images but they don't resolve then your wp-content/uploads directory didn't get properly transferred.

Avatar
Azmat
Member
Members
Forum Posts: 41
Member Since:
November 9, 2011
sp_UserOfflineSmall Offline
5
November 14, 2012 - 10:41 am
sp_Permalink sp_Print

Thanks Rick.   I'll go over the video again to double check what I did.   I thought I copied over the db correctly since I see the images in the folder when I check file manager in bluehost.  I just don't see them being shown in the media library in wordpress.  I must have missed something.  Hopefully I can find the issue soon.  Thanks!

Avatar
Rick Anderson
Desert Hot Springs, CA
Admin
Forum Posts: 13637
Member Since:
November 8, 2009
sp_UserOfflineSmall Offline
6
November 14, 2012 - 2:12 pm
sp_Permalink sp_Print

I would just export a new copy of the database, clear all of the tables of the database that isn't working and reimport the copy.  Then you'll need to change the site address and url in the database.

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 228

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Keith W Jones: 1431

Brian Tozer: 1004

Carolin: 982

Heidi Hafner: 509

John Cunningham: 423

Reece Morrel: 353

Newest Members:

emma62755

sharonmarks

emma80233

Tijs de Jong

Daniel Frey

mutek

Forum Stats:

Groups: 8

Forums: 46

Topics: 6998

Posts: 34804

 

Member Stats:

Guest Posters: 6

Members: 6761

Moderators: 2

Admins: 2

Administrators: Rick Anderson, Rick Anderson

Moderators: Pierre Cote, Laura Nugent