Showing results for 
Search instead for 
Did you mean: 

Editing Magento Staging/Test Site

Editing Magento Staging/Test Site

Okay, so everyone said that before upgrading and doing most anything on your magento store you should create a test/staging site. So I went ahead and did this before attempting an upgrade from 1.5 to 1.9.  


Now the upgrade didn't work, and I'm still working on that, but my question for now is how I can log on to the admin panel of Magento (where orders, inventory, design & such can be changed) and have these changes effect the staging site, not the production site?


Is there a completely different portal for accessing a staging site, where it's domain is '', or is there a little box I have to check or drop down menu for choosing what subdomain my changes are being applied to?


Re: Editing Magento Staging/Test Site

Assuming standard admin url is being used, and the following subdomains assigned:


1. your main website is

2. your dev/staging is


To access the admin back end for each:


1. for live admin, go to

2. for staging server go to


These Magento instances should be two separate installs, each with it's own database.

Re: Editing Magento Staging/Test Site

Hey thanks for the help, unfortunately this doesn't seem to be working...


We don't have the admin URL set to the default, instead it has a custom name, not sure why.


Anyways what is strange is that when I add the custom url to the end of it redirects me to our live site at the www address...


I've also tried adding /index.php/ in between the custom Admin URL ( admin html)


Everything just ends in a redirect to our home page (the live version, not the staging site)


Let me know what you think & thanks again!

Re: Editing Magento Staging/Test Site

Also I saw in some other forums that running magento from a subdirectory in the public_html folder can cause this problem, so maybe that is to blame?


Can't remember if i stated earlier, but I did edit the secure & unsecure URLs in the database to point to staging subdirectory

Re: Editing Magento Staging/Test Site


After importing the database to staging run these sql queries:



UPDATE core_config_data SET value='{{base_url}}' WHERE path='web/unsecure/base_url';
UPDATE core_config_data SET value='{{base_url}}' WHERE path='web/secure/base_url';
UPDATE core_config_data SET value='{{unsecure_base_url}}skin/' WHERE path='web/unsecure/base_skin_url';
UPDATE core_config_data SET value='{{unsecure_base_url}}js/' WHERE path='web/unsecure/base_js_url';
UPDATE core_config_data SET value='{{unsecure_base_url}}media/' WHERE path='web/unsecure/base_media_url';
UPDATE core_config_data SET value='{{secure_base_url}}skin/' WHERE path='web/secure/base_skin_url';
UPDATE core_config_data SET value='{{secure_base_url}}js/' WHERE path='web/secure/base_js_url';
UPDATE core_config_data SET value='{{secure_base_url}}media/' WHERE path='web/secure/base_media_url';

Let me explain

Your base url is configured to live, so when you run on staging you will be redirected to live.



You can always change {{base_url}} to your staging url (


I hope I could help.

Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation:

Re: Editing Magento Staging/Test Site

Hi there


Just wondering if you solved this as I have exactly the same issue?

If you did find a fix can you post it here?



Re: Editing Magento Staging/Test Site

TMCDESIGN, as Daniel noted, the problem you are seeing is because there are two rows in the core_config_data table that provide a BASE_URL (one secured and the other unsecured) that tell Magento what URL to use as the base of your site.


For your "live" or production website these values are set to www,


When you made a copy of your database for your "staging" or testing site, you forgot to CHANGE the values of these two core_config_data values so that instead of pointing to


they point to or


When you find those fields and update them in your database (perhaps with using the query provided in Mr. Souza's answer) you will no longer see the redirect behavior that is vexxing you.

Bryan "BJ" Hoffpauir - Contact me on my Blog!

Contact me at work via AOE - the open web company online!