1

My goal is to duplicate a Drupal 6 site to a new host, but I am having some problems.

  New host - 198.20.226.199/~paul8226/ -- No name resolution setup yet.
  Old host - www.egcasting.com/

I performed a fresh Drupal 6 install on the new Host Gator account using the same database name, username/password as my existing site (clean URLs worked.) Then I imported the database from the existing site, and copied over sites/default (except settings.php) and all of sites/all. It looks like the site totally functions, except the theme is not styling anything at all.

Google Chrome developer tools is telling me I am missing the below CSS files, both of which are on my file system:

http://198.20.226.199/~paul8226/sites/default/files/css/css_89883be7e51f5fd34095c91a397aee3c.css
http://198.20.226.199/~paul8226/sites/default/files/css/css_6ca651b4b42888393291ef9ea27101fa.css
.
.
.

-rw-rw-r-- 1 paul8226 paul8226 39K May 13 15:57 css_89883be7e51f5fd34095c91a397aee3c.css
-rw-rw-r-- 1 paul8226 paul8226 549 May 13 15:57 css_6ca651b4b42888393291ef9ea27101fa.css

The CSS on the old host is working fine. So far, I have looked at the file, and directory, permissions going all the way up. I also tried turning on and off the CSS compression. Turning off CSS compression made the site styling look totally off in another way. When I look at the themes option, it looks like the custom theme I am trying to copy over is having some serious issues:

Theme looks broken Broken Theme

Theme looks not broken Working Theme

I also looked through the theme permissions, and they look like what I think they should be.

 # pwd
 /home/paul8226/public_html/sites/all/themes
drwx--x--x 4 paul8226 paul8226 4.0K Aug 25  2009 eg_prod/
.
.
.
# cd eg_prod
# ls -laSh
total 260K
-rw-r--r-- 1 paul8226 paul8226  42K May 13  2009 theme-settings.php
-rw-r--r-- 1 paul8226 paul8226  37K Sep  9  2009 style.css
-rw-r--r-- 1 paul8226 paul8226  32K Aug 21  2009 template.php
-rw-r--r-- 1 paul8226 paul8226  15K Apr 23  2006 LICENSE.txt
-rw-r--r-- 1 paul8226 paul8226 7.8K Apr 20  2009 style-rtl.css

Thank you very much for taking the time to help me with this. Normally this 'thanks' section gets edited out, but oh well. Thanks!

1
  • copying the whole site with db wont work??
    – Prem Anand
    May 14, 2013 at 6:10

1 Answer 1

6
  • /sites/*/files/css/ and /sites/*/files/js should be empty just after migration - do not copy their contend. Clear them.
  • Before making original site database snapshot, turn off css and js aggregation. If you didn't, turn it off now. If you don't, the duplicated site will be looking for the aggregated content which may, or may not be available on the new site.
  • On new site, make sure /sites/*/files/ directories are writeable by your php scripts, and that php can delete files too.
  • Search all theme files for not-relative URIs. There shouldn't be any.
  • Fix one problem at a time. First, make it work without aggregation (most probably it's URI problem), and only then attempt to fix aggregation issues.
  • At the end, if you still have problem - disable and then enable theme. This should ensure all theme-related caches are regenerated and theme settings variables refreshed.
7
  • 3
    +1 - your site / theme should work fine as soon as css aggregation creates new files in the new environment. flush cache liberally.
    – schnippy
    May 14, 2013 at 13:45
  • 1
    Thank you very, very much for your extremely detailed answer. I will try these solutions. I now understand why the CSS and JS aggregation should be turned off before copying over a site - the duplicated site will be looking for the aggregated content which may, or may not be available on the new site. Thanks!! May 14, 2013 at 16:20
  • 1
    @Brian added your comment to my answer. A bit of explanation will not hurt. I cared to much to get things done and not enough to let everyone know why to do certain things.
    – Mołot
    May 21, 2013 at 14:42
  • Thanks. Unfortunately now I'm running into these type of issues after flushing the cache on a development copy of the site, but progressing: drupal.org/node/1172560 May 21, 2013 at 18:56
  • 1
    @Brian - I just added your last step to my answer. Hope it'll save someone's time in future, so let's keep it visible. Glad it worked for you, after all.
    – Mołot
    May 21, 2013 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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