Subdomains with Magento - magento

THis is probably a dumb question, but I am currently moving to a new install of Magento. I'm on a Ubuntu server with nginx. The current installation is at /var/www, but I moved it to /var/wwwOLD so that the new site could be at /var/www. Is there a way to access the old site without renaming the new directory one to something else and the old one back to /var/www?
Sorry if this doesn't make much sense or is a common sense question that I should already know.

You setup a duplicated version of Magento in a separate folder by doing the following.
Configure a subdomain that points to the old folder. Example: oldsite.yoursite.com
Duplicate the Magento database to a new database
Edit the core_config_data table in the duplicated Magento database and edit the records with the path values web/unsecure/base_url and web/secure/base_url to the oldsite.yoursite.com domain value.
Edit the app/etc/local.xml file to point to your duplicated database (the one with your updated urls in the core_config_data table)
Delete everything in the var/cache folder.

Related

Prestashop Url change

I have a problem,
I changed the url of my prestashop because I have a new url.
But now i have the Problem that i tipped in the wrong path, and if i want to log in as admin then the shop directs me everytime to the wrong path so I can't change anything...
Does anybody know in which folder of the FTP Server I can change it in the data?
I tired to delete the htaccess data but this didn't help me.
Or is it another option to go back to where I started, before i changed the Url?
I think that your problem occurred not from a .htaccess but from your database. Prestashop keeps domain URL in the DB and if you changed it you better to check table configuration fields PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and table shop_url. I think that the problem is over there.
When you want to migrate to another server, you have to
Update the _DB_... constants in config/settings.inc.php file
Since your database does not changed, this step is not necessary.
Update PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL fields in configuration database table
Update the domain, domain_ssl and physical_uri fields in the shop_url database table
Now you can log in to the admin page. When you did it, your first step has to go to Preference -> SEO & URLs, then turn off and on again the Friendly URLs switch to update the .htaccess files.
These steps are works on Prestashop 1.6, but not tested on 1.7.
See the official blog post for additional details:
https://www.prestashop.com/en/blog/how-to-migrate-prestashop-to-a-new-server

Magento Products are not listed on fronend

I downloaded a old magento site and installed it on my local server.
My admin panel is working perfect but products are not listed in frontend.
Links on the front end page are also not working.
When you say that you 'downloaded an old magento site', do you mean that you just copied down the folder structure?
If so, this won't have copied the product database, which is an entirely separate entity to the php/js/html/css that comprises the file structure.
Try reindexing and clearing the cache. Also, did you make sure the Base urls were updated in core_config_data database table?

Moved magento site to another host, redirecting to the old site

We have moved out magento site to another host. But it is redirecting to the old site
We did following changes before moving the site
1. DB backup
2. files are zipped and copied to another host.
after moving the site to another host
1. changed the /web/secure and /web/unsecure values in the DB.
2. In magento files /app/etc/local.xml changed the database name.
3. cleared the var/cache
4. cleared the var/tmp
5. cleared the var/session.
but still the magento site is redirected to old site.
Can any one help me with this.
Thanks
Several steps involved in cloning or moving a website.
NOTE: It's common practice to empty the var/cache, var/session directories before copying to new location. Clearing cache is mentioned below as it's necessary to clear the cached config after you've run through the list and properly set database access, BaseURL, etc.
Copy application files to new location and import database into MySQL. (best to do this with a tarball and database dump sql file, ftp has issues with things like getting .htaccess files to transfer, case to matter, etc.) Note: more sophisticated Magento admins use rsync, it's far easier.
(important!!) Make sure file/folder permissions and owner/group are correct so that var/ folder system is writable. Otherwise the Magento cache gets written in system /tmp instead of Magento var/ and only a server reboot or manual deletion will clear Magento cache out of /tmp . Also, not having var/ writable means that any drastic errors that write a file to var/report/ will fail to write any stack traces, compounding your installation heartburn.
Make sure app/etc/local.xml points to the proper database and make sure if you back up the original local.xml that it doesn't end in .xml -> needs to be something like local.xml.sv1
Change your database entries Unsecure BaseUrl for and Secure BaseURL to point to your new location (http://www.example.com and if ssl cert installed https://www.example.com respectively). Use phpmyadmin to look for the paths web/unsecure/base_url and web/secure/base_url in the core_config_data table. (Note: entries will exist for each scope set, minimum is Global)
Manually clear your cache by deleting all the mage--? subfolders in var/cache
If you were using the compiler on the previous site, disable compiler with SSH command line php shell/compiler.php disable from the Magento root.
Attempt to load your admin backend, you should be on the new server URL now.
Following these steps should clear all the hiccups that cause Magento to adamantly redirect back to the old server. And believe me, I've had them all happen.

*some* magento links pointing to old domain

I have just moved a magento site from one domain to the new one. Steps so far...
Backup the database and restore the database on the new domain. Change the core_config_base table for secure and unsecure base urls
Upload source files
Update the local.xml with new database information
Cleared cache
Now I can go to the site and everything is showing up fine on the new domain. The main navigation is working as it should. When I click on a product, however, it goes to the old domain. Does anyone know why this might be happening?
Can you verify the links when you hover products are correct or in correct consistently? Is old base URL in all links I mean. Also check htaccess file for any directives containing the old domain. Also check to make sure no custom URL rewrites exist in the Magento admin Catalog → URL Rewrite Management .Once you verify htaccess or custom URL rewrites in Magento admin are not causing it, I can suggest other procedures to fix.
Probably your previous developer didn't follow all Magento standards while coding.
My suggestion is download your code and search for strings that equates to your previous domain.Also check in data base, as use of CMS blocks too might result in previous domain links.
Btw make sure you delete all caches
Rm -rf var/cache/*
Verify base URL and secure URL are correct in all scopes via drop down in Magento system configuration.

Move Magento to new domain & server results in default homepage

I have just moved a Magento install from one server to another, and this is a change of domain too. I have moved all files from one /httpdocs directory to another /httpdocs directory.
I have uploaded the new database and imported the data as well as updated the local.xml file to point to the new database.
But when the site loads I get a default looking Magento page, rather than the correctly skinned Magento store.
Is there some config I have missed?
Make changes in your DB :
In core_config_data table, the values you need to change are in the path column. Change the web/unsecure/base_url and web/secure/base_url to match the new domain name by altering the value column for both records.
After that clear all catch, may you forget to do this step.
The answer is here, look at step 4. http://www.atwix.com/magento/moving-magento-to-another-server/
Log in to admin panel and go to System->Configuration->GENERAL/Design
Open package and themes, then set your custom package & themes name here. After that clear all cache from System->Manage Cache.
Hope it will work!

Resources