Move to another Server, same domainname

When I want to move OXid to another server, can I copy all the files instead of installing new?

So copy all files, copy the database, adjust the config and change the DNS so the Domain points to the new server.

Is this the correct way?

Regards,
Jan

Basically yes. However if the new sever has a different environment, it might not work at all or not properly.
First of all check if the new server system complies with Oxid system requirements for your shop Version or if it’s really the same as old server. Different php-versions and folder/file access rights mostly cause problems.
Or simply give it a try, copy and see if it works (mostly it doesn’t).

Thanks Earlybird,

The new server has far more resources and the PHP Version can be adjusted so I will give it a go. I can set the filepermissions with tha commandline, I did so for other systems based on PHP/Smarty.

I will notify what happened afterwards.

Regards,
Jan

One more thing to be considered.
The new DB user, user-rights(!) and pw must match the former configuration as well.
There might other issues with views, tmp etc.
Good luck!

Hey Jan,

have a look at this tutorial: https://oxidforge.org/en/how-to-move-oxid-eshop-from-one-server-to-another.html

Although it is from 2011, nothing really changed in handling :wink:

Regards

OK
I have transfered all Files, the Database is too large to import through phpmyadmin so I had to use the commandline.

Filepermissions were set to 644 for all files and 755 for directories, tmp on 777
I have adjusted config.inc.php and put another domainname to test.

Now I do not get the css loaded.

The admin-login shows but after filling in user/password it says “Server not found”

Anyone a hint?

Kind regards,
Jan

After clearing the caches several times and deleting all the views I get a white screen with
" Shop offline!"

Also with admin I get " Shop offline!"

Does that mean one has to completely re-install oxid-shop, and manually put the database back, load all extensions/modules again, copy in the adjusted files etc. etc.?

When so, this is an argumant not to choose Oxid. I have just transfered a Presta-install this was much easier, just had to make some minor adjustment to filepermissions.

Moving from one server to another is not such an exceptional event, can we please go through this so I can ducument it and put a tutorial here that describes this in detail without having to do an almost complete re-install.

Kind regards,
Jan

Dude, no re-installation is necessary. Moving a shop from one server to another is as simple as picking bogeys - especially, if you do everything correctly and follow the instructions of the tutorial I linked above.

Usually the message “shop offline” appears on both sites, admin and storefront, when the database connection is lost. So check out the database credentials for your new server in config.inc.php.

Cheers

In general, all you have to do is copy db and files and adjust config.inc.php (and maybe htaccess in case the subdirectory in your shopurl has changed).

The tutorial however gives some hints to minimize errors during this process:

  1. The tutorial advises you to install the shop in your version first. There are two reasons to do this: It gives you confidence that your new environment is functional and your DB credentials are correct, and it creates config.inc.php and htaccess for you. If you feel you don’t need this and you like to adjust config.inc.php manually, feel free to skip this step.

  2. There are often problems when transferring database views, so the views should not be transferred and instead should be recreated from oxid backend.

  3. /tmp does contain domain-specific information, therefore it has to be cleared.

If you cannot access your backend after the transfer and deleting views and clearing /tmp:

Thanks Frank,

I know my way with mysql, php smarty etc. for I service more webapps build that way.

I will start over again. Strange enough I cannot get the resultfile from the diagnostic tool, seems not to work, the PHP-logfile does not show anything so I cannot see why.

On the “new” server I see in the TXT file with errors that Oxid saves in the log-directory that oxv tables (views) are missing, so I wonder why they should be deleted.

I will start over again, deleting the whole install on the server, but reading the forum it seems clear that simply copying the files and the DB, then adjusting config.inc.php does not work with Oxid, one needs a whole lot of time just to transfer to another server.

Regards,
Jan

Sure it works this way. Copy files and DB, adjust config.inc, delete views and empty /tmp. Then recreate views from backend and you’re done. Well maybe adjust permissions depending on PHP config.

Views should be deleted because they often don’t work after transfer or give errors during import. If you see the message missing oxv_table in oxid error log, probably some module depends on views (i think the pure backend does not), so you have to disable view usage in config.inc.php temporarily with blSkipViewUsage, remember to switch it on again after you recreated the views.

OK
I downloaded the exact same version of Oxid that is installed at the original server, being community-edition 4.8.7

Started the install and it will not install . . . . mod_rewrite not loaded
I run a rootserver and mod_rewrite IS loaded, one of my own websites uses it.

Seems this bug is there for about 7 years now.

Question:
Do I have to give “AllowOverride All” for the whole Apacheserver?

Or how do I make this work, is there some patched php-file that recognises mod_rewrite and lets me continue installing?

regards,
Jan

Oxid throws an Apache mod-rewrite module error during installtion if e.g. a htaccess (as mostly used in dev-environment for pre-login) blocks the installfolder or accesss rights are no set server specific - or Apache sites-availbale and sites-enabled might not be set correct?

Hi Earlybird,

the directory where OXID is installed was empty, just unpacked the zip-file.
On the server several other webapps are installed without problems with mod-rewrite.

If a htaccess blocks the installfolder it is the one delievered by Oxid.

I moved all files to “/” so there is no directory with the version in the dirname.
Could that be the cause?

Regards,
Jan

The htaccess that comes w/Oxid file package 487 out of the box and doesn’t block anything by default.
No need to move the files to a start dir / - best practice is to put it in an own folder like /var/www/oxid487/ or whatever you like.
Then unzip Oxid again in your clean new folder and leave it there.
Next check if access rights are sufficient for installation (refer to Oxid system requirements).

OK

I have set “AllowOverride all” in apache2.conf
Ran “a2enmod rewrite” which answered Module rewrite already loaded
I removed the complete install under the domainspace
Uploaded the zipfile with Version 4.8.7 again
Unzipped it
Oxid is then in subdirectory “oxid-downloads-CE-4.8.7”
In the browser I gave
http://domain.tld/oxid-downloads-CE-4.8.7

The Oxid install screen shows everything green except for “Apache mod_rewrite module” which is red

I know I am only some thirty years in the ICT so a real newby but this is definitively a bug then the module is loaded.

There is no error in the errorlog.

What can I do to move this shop to the dedicated rootserver, the instructions told me to install the same version which is not possible.

Regards,
Jan

Also
put PHP from 5.6 tp 5.5
took 4.8.6 instead of 4.8.7

Still same result

Then try Loefonic’s solution: http://forum.oxid-esales.com/showthread.php?t=19257

In file: \core\oxsysrequirements.php you can find following function and change return 1 to return 2.

public function checkModRewrite()
{
    $iModStat = null;
    $aHostInfo = $this->_getShopHostInfo();
    $iModStat = $this->_checkModRewrite( $aHostInfo );
    $aSSLHostInfo = $this->_getShopSSLHostInfo();
    // Don't need to check if mod status is already failed.
    if ( 0 != $iModStat && $aSSLHostInfo ) {
        $iSSLModStat = $this->_checkModRewrite( $aSSLHostInfo );
        // Send if failed, even if couldn't check another
        if ( 0 == $iSSLModStat ) {
            return 0;
        } elseif ( 1 == $iSSLModStat || 1 == $iModStat ) {
            return 1;
        }
        return min( $iModStat, $iSSLModStat );
    }
    return $iModStat;
}

Even setting return = 2
does not solve the problem.

I have tried installing on the VServer, there I run Owncloud - Nextcloud - Prestashop - CMS’s - Accounting - CRM - Timetracking

The only programm producing this “false error” is Oxid.
Redirects with mod_rewrite in htaccess are used with almost all websites so it is functional.

I have the original shop installed on a webpack from hosteurope where it did work and now I need it moved to a rootserver where Plesk 12.5 is installed.

What do you propose, should I start taking out all checks on mod_rewrite?
Very odd is that there are no error messages from PHP, I specifically put all notices ON.

Regards,
Jan

Yes, you can try it that way and see what happens with the mod_rewrite issue - it’s only a check function anyhow.