2

I've been let down with a developer going AWOL half-way through a project and have had to learn as I go to get our new site sorted.

The current site is : ourdomain.co.uk/ (not magento)

We have the development site on : ourdomain.co.uk/beta2

How do I replace the live site ?

My plan is to backup, delete old site files and replace with files from /beta2 and use an extension I have for 301 redirects.

Please advise if this is a bad thing to do a better way.

  • You want to move the ourdomain.co.uk/beta2 content to ourdomain.co.uk/ ? – PЯINCƏ Nov 13 '18 at 17:20
  • Yes without messing anything up – Ryan Nov 13 '18 at 18:27
  • 1
    Hey Ryan, I'm afraid you will have to be more specific. Assuming you got a full setup at "ourdomain.co.uk/beta2", independent from "ourdomain.co.uk": how about just moving the content of /beta2 to / (or change the webroot, which might be easier, depending on the GUI you use for managing your webspace), remove /var/session and /var/cache and update /app/etc/local.xml with your database details? Whether to use the current "live" database or the one used in /beta2 depends on what is stored in the database (i.e. has there been another version of your shop online already). – Christoph Farnleitner Nov 13 '18 at 20:36
  • +1 for simply changing the webroot. – simonthesorcerer Nov 14 '18 at 13:04
1

You have two Magento's and you want to replace the ourdomain.co.uk/ content with ourdomain.co.uk/beta2 otherwise you want to move the beta environement into live environement

Folder side :

Schema :

1. ourdomain.co.uk/ 
     server: |___ var/www/html

2. ourdomain.co.uk/beta2 
     server: |___ var/www/html/beta2
  1. Create folder : prod_backup in : var/www/html then move all the content of this var/www/html inside prod_backup, now you will have just prod_backup folder in var/www/html.

  2. Copy the var/www/html/beta2 content inside var/www/html/. (now we have copied the beta2 in live site : var/www/html/)

  3. Go to var/www/html/app/code/local.xml then change the data base credentials from the beta to live one like this:

    <default_setup>
        <connection>
            <host><![CDATA[localhost]]></host>
            <username><![CDATA[user_here]]></username>
            <password><![CDATA[password_here]]></password>
            <dbname><![CDATA[database_name_here]]></dbname>
            ...
        </connection>
    </default_setup>
    

Database side :

  1. Do a backup of the livesever database then replace it with the beta database.

  2. You have to change the base url in the new Database in core_config_data table in : web/secure/base_url and web/unsecure/base_url or via query :

    update core_config_data set value = 'http://ourdomain.co.uk/' where path = 'web/unsecure/base_url';
    update core_config_data set value = 'http://ourdomain.co.uk/' where path = 'web/secure/base_url';
    

Good luck.

  • Thanks for your answer, very thorough. The database I'll just use the new one with magento and forget the old. In this case I'll just backup the current files in html/ in prod_backup as you mention and replace with the beta2 files. I may be over thinking this but this is new to me and don't want to be penalised by Google. – Ryan Nov 14 '18 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.