Setting Up a Temporary URL on Magento (and Fixing Related Errors)

magento-logo_0

Magento is a great online e-commerce platform.

In fact, it’s our personal favorite.  But when we started using it, there was one issue we kept running into.  You see, for some reason, Magneto doesn’t always play nice with temporary URLs (or “temporary domains” if that’s your bag).

If you’re not ready to launch a website into the wide-open internet, temp URLs provide a great way to have the website online without it actually being “live”.

Thankfully, we have the situation pretty locked down these days.  So for those who are having troubles with their own Magento sites, we are here to help!

How To Set Up a Temporary URL on Magento

The first thing you have to do is install Magento.  When you’re installing it, we recommend you click the box that says “Use mod_rewrite”.

One you have that in place, go to your cPanel and click on phpMyAdmin.  Once you’re there select your Magento site on the left hand column (should have mgnt in it) and find the file called “core_config_data”.

Click on it.

From here, you’ll need to edit lines 6 and 7.  Replace the sites URL in the “value” field with your temporary domain.  (Our temporary domains are typically http://[IP-address]/~cPanelusername/)

Finally, go back to your cPanel and select the File Manager.  Go to public_html/var/cache and delete all of the interior contents.  Once that is done, go to your temp address, and you should be seeing a very plain-but-functional Magento page!

Either that or you’re seeing some image errors or experiencing 404s.  If that’s the case, don’t worry.  There’s still hope!

404s? Can’t Access the Admin Panel?

404

If you’re having trouble accessing the temporary address, it’s possible you entered it incorrectly.

Revisit the core_config_data file and check the address.  Make sure you started it with http:// and make sure you end the address with a forward slash ( / ).  If you missed doing one of those things, correct it, delete the var/cache files again, and try the temporary address again.

Still Not Working?

This step hasn’t always proven necessary, but it’s worked for us in the past.  Go back to the core_config_data file and find the line that says web/seo/use_rewrites.  If its value is currently 1, trying changing it to 0.

Save it, return to file manager, clear the var/cache files, and try your address.

Hopefully everything looks in order, and you can access the admin panel.

If you’ve had other errors with temporary Magento URLs, and/or you have figured out different ways to fix them, we’d love to hear about it.  Just share in the comments below!

Did we help solve your problems?

Written by Timothy Snyder
on October 28, 2013