How To Copy Products From One Website to Another Website in Magento

We’ve been playing around a lot with our Magento commerce websites over the course of a year or so. Which products on which website, categories, trying to avoid duplicate content, playing around with Google AdSense, etc.
Recently, we decided to change our power tools website, from a Magento commerce site to a Google AdSense site. We still had a couple thousand products from the power tools site in the Magento database. We decided we wanted to move all the power tools to a different Magento commerce site, so we had to come up with a solution for moving ¬†or copying all those products to the other website without eating up tons of time and resources. Turns out, it’s actually pretty easy.

  1. Log in to your Magento Admin
  2. Go to Catalog>Manage Categories
  3. Have your default view active instead of just store view.
  4. Drag the categories you want from one store to the other store view where you want to move them. (This is assuming you want to move the products from one store in Magento, not just copy them from one store to the other.)
  5. Go to Catalog>Manage Products
  6. Do a search so that you will come up with the products you want to copy or move.
  7. Click the Select Visible link. (We do this to be safe at first. You can change the number of products that are visible with your view per page toggle.)
  8. On the Actions drop down menu, select Update Attributes and click Submit.
  9. This opens another page.
  10. Select Websites from the left column.
  11. Now, check the checkboxes for the site you want the products on and check the sites you want the products removed from.
  12. Click Save.
  13. You have now moved all of those products or copied those products, depending on your selection from one Magento site to the other Magento commerce site.
  14. Make sure you refresh Catalog Rewrites and Layered Navigation Indices in System -> Cache Management

That’s it! Within minutes you have moved products from one Magento eccommerce store to another Magento store.

Change File / Folder Owner With SSH

After doing a transfer of files for a website using SSH, if you’ve transferred from one domain to another, you’ll probably run into a file or folder ownership problem. Using SSH, this is actually easy to fix.

Log in to your server using SSH

Change to the directory you need to change permissions or ownership.

chown -R correctuser *

correctuser is the name of the owner of this website

That’s it. You’ve now changed the owner of files and folders in that directory using SSH.

Another Way to Move Website Via SSH

Very recently, we published an article about moving entire website from one server to another via SSH. Sometimes those commands give us problems with the resulting transfer, so we found this alternate method that seems to work perfectly.

Keep in mind, you MUST perform separate actions for copying or moving databases as well as adding email addresses.

1. First log in to your old server via SSH. If necessary, you may need to login as a “super user”.

2. Change directories to the directory where your website resides.

3. Type in the following code:

4. tar -cpzf backup.tar.gz *

6. This creates a tar file of all files in that directory.

7. Login to your new server.

8. Navigate to the directory where you want to place the website you are moving.

7. Type in:

8. wget yourdomain.com/backup.tar.gz

9. (Of course, yourdomain.com is replaced with your actual domain name). This transfers the tar file from the old server to the new server.

10. Once the file is transfered, type:

10. tar -xzf backup.tar.gz

11. This will unpack the tar file onto the new server in the directory that you placed it.

That’s it, another way to move websites using SSH.

How To Move A Website From One Server To Another Using SSH

If you ever have the need to move or migrate complete websites from one server to another, you know what a hassle it is using FTP. For one, it takes a long time, especially for larger sites, plus most of the time, we lose connection and our FTP program stalls, meaning we have to start all over again. So here’s how to do it using SSH /Telnet.

  1. First log in to your old server via SSH. If necessary, you may need to login as a “super user”.
  2. Change directories to the directory where your website resides.
  3. Type in the following code:
  4. tar -cvf sitepack.tar ./ This creates a tar file of all files in that directory.
  5. Login to your new server.
  6. Navigate to the directory where you want to place the website you are moving.
  7. Type in:
  8. wget yourdomain.com/sitepack.tar (Of course, yourdomain.com is replaced with your actual domain name). This transfers the tar file from the old server to the new server.
  9. Type:
  10. tar -xvf sitepack.tar
  11. This will unpack the tar file onto the new server in the directory that you placed it.

There you go. Within seconds you have moved all your site files from one server to another using SSH, which makes migrating a website as easy as ever.

Keep in mind, you MUST perform separate actions for copying or moving databases as well as adding email addresses.