1

I want to do developments on my client's website but by making a clone of it. So, main website url is: http://website.com and the clone i am trying to create is: http://test.website.com.

So far i've done the following:

  1. copied entire root directory into public_html/test dir (with folders config,field,FirePHPCore,fontyourface,includes,js,misc,modules,scripts,sites,styles and themes)
  2. created a subdomain in cPanel for test.website.com
  3. checked the file settings.php (inside sites/default folder) for $base_url but found it commented, so left it as it is unchanged.
  4. copied db via phpMyAdmin and updated the new db details in settings.php (inside sites/default folder).
  5. inside the table variable, two rows with the name securepages_basepath and securepages_basepath_ssl. Changed their values from http://website.com to http://test.website.com (using the variable_get and variable_set functions).

Now i can access http://test.website.com but when i click on login (from header) it takes me to http://website.com/user and if manually type http://test.website.com/user and login then it takes me to http://website.com/users/admin then i have to manually type in correct address http://test.website.com/users/admin.

And when i logout, it again takes me back to http://website.com.

So i want to know how can i completely make it to work on http://test.website.com? Are there more variables to change? And how i can make 100% sure that the test site is only using test and not the live site. I am afraid of messing up live website.

Please advice, thanks!

Aamir Siddique
  • 334
  • 3
  • 15
  • Are you sure you omitted data from cache tables during your migration? – Mołot Oct 04 '13 at 12:13
  • 1
    @Mołot, i forgot earlier but now i `TRUNCATED` all the cache tables but it still goes to `http://website.com/users/admin` after login, instead of staying on to the `http://test.website.com/users/admin` – Aamir Siddique Oct 05 '13 at 00:12
  • Also i just noticed that whatever i am changing being on the test site admin `http://test.website.com/users/admin` it is affecting the live website! I double checked the `settings.php` file and i have test db info set there and not the live one. Any help? – Aamir Siddique Oct 05 '13 at 00:54
  • just another weird thing i am noticing, i.e. if i put a wrong db details inside the `public_html/test/sites/default/settings.php` file and hits the site but it still works. It is showing that its loading content from `http://test.website.com/` but i think its loading configuration from the live website. – Aamir Siddique Oct 05 '13 at 02:42
  • ok, after a lot of digging and searching all over google, i got my problem fixed by setting off the `secure pages`. Since it was not allowing me to do that due to the urls being changed after login, so i had to do it manually from mysql db under `variable` table and `securepages_enable` field, it was in blob so i downloaded the blob first and then changed the value in it from `1` to `0` and uploaded it back using `phpMyAdmin`. – Aamir Siddique Oct 05 '13 at 06:24

1 Answers1

1

I fixed it by disabling the secure pages from inside the mysql database. It was inside variable table and securepages_enable field. It was in blob so i had to download the blob first and opened it in notepad and changed the value inside it from 1 to 0 and then uploaded it back by updating the securepages_enable field.

I had to do this because after logging in from my test url, the urls were redirecting back to the live website, so whatever change i was making, it was all affecting the live site.

Hope this helps to someone with similar case. Thanks!

Aamir Siddique
  • 334
  • 3
  • 15