October 7, 201213 yr Hey all! I no this topic has been previously brought up however, I think I must have another underlying issue. Basically I have edited an existing theme from THEME FORREST to suit my needs. I also got the content and CSS perfect. I now want to transfer it all to another domain. Due to the fact I designed it with my domain, I didn't realise it would be this much of a ball-ache! All the guides I have read up on were all dating back 4 years ago using phpmyadmin to create database backups etc etc. Well I tried this and the the new domain would not show the website style correctly as I edited it, almost like it resorted back to default. I have used my FTP to copy and paste the entire blog from one server to the other and again had no luck. I thought this was a CSS issue or perhaps the blog is still trying to contact the old domain. Hope I put my point across clear enough to get some advice. Cheers all in advanced! J
October 7, 201213 yr Moving a WordPress site isn't as easy as just doing a find and replace in a SQL dump, because WP can store URLs and paths in serialized arrays in its database. Let me give you an example: <?php $the_array = array( "Lorem", "Ipsum", "Dolor" ); $serialized = serialize($the_array); print $serialized; ?> will output: a:3:{i:0;s:5:"Lorem";i:1;s:5:"Ipsum";i:2;s:5:"Dolor";} s:5:"Lorem" means: string: 5 characters long: "Lorem". Now imagine instead of "Lorem" the string is "exampledomain.com", and you want to move your site to "adifferentdomain.com" - you can find and replace on the SQL dump, but because the number of characters is different, when WP runs it through unserialize() to convert the data back into an array again you'll only get "adifferentdomain.", because the header information for that array member will say it's only 17 characters long. You should also never hard-code your domain in your template files (really hope you haven't been doing that) - instead, use: <?php echo get_bloginfo('url'); ?> when you want your domain, <?php echo get_template_directory_uri(); ?> when you want your theme directory, and <?php echo get_stylesheet_directory_uri(); ?> if you're using a child theme and want to specifically call the child theme's directory instead of the parent theme's. I can't help you with the templates, but you can move a WP site using this nifty migration tool written by ex WDF mod ErisDS. Edited October 7, 201213 yr by Renaissance-Design
November 20, 201213 yr Author Thank you for your help. Sorry for the late reply been busy as hell! I haven't looked into GitHub before. In the end I just rebuilt it from scratch. Actually didn't take as long. I will have to look into GitHub soon. Cheers again mate. Edited November 20, 201213 yr by JaYUK666
November 20, 201213 yr Just to chip into this for the sake of others, I use a plugin called Wordpress Move and even though it has a bit of a learning curve its a great tool for moving sites from 1 domain to another. Edited November 20, 201213 yr by jamesosix
Create an account or sign in to comment