We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42511
    • 60 Posts
    Hi,
    I've now been messing about with modx for quite a while now, although as the messing about has to fit around a full-time job, a fishing habit, and the normal stuff everyone has to do to stay alive, that hasn't maybe been such a long time.
    After initially starting to develop a site locally on xampp, I started again from scratch and began building one in a subdomain of some webspace that I had. That's been going quite well and,thanks to the helpful people in these forums and Bob's book, I have pretty well reached a point where the site should be usable. Just the not inconsiderable task of making it easy for those who will edit and use the site to be able to do what they want while simultaneously preventing them from breaking anything.
    What I'd like to do is to download a copy of the remote site that I've built and load it into a new install of xampp. I've already tried it once and got '500' messages on every screen and xpdo messages in the error logs, so I uninstalled xampp, cleaned the registry and zapped the folders so I can start again from scratch.
    I've tried to follow the online instructions for moving a 'Revo' site, so I cleared the cache and flushed permissions before creating a compressed folder of the remote site files and exporting the database files. Anyone got any ideas of what do I need to do to make the load work?
    The remote site is running Revo 2.2.8(upgraded from 2.2.6).
    The pc on which I'm going to install xampp is running Windows 7.
    Last time I tried, I installed xampp then copied the unzipped remote files to the xampp/htdocs directory, amended the config files to point at C:/xampp/htdocs/core/, created the database with the same name as the remote one, imported the database files then amended the workspaces entry in the db. Started up the database and apache ok, but when I tried to log into anything except phpmyadmin, just got the 500 screen. Couldn't run modx setup as I had no setup files(remote site installs through cpanel). All the config files looked OK. Is there something that I've missed? I wondered if it could be the phpmyadmin password(except I'm not sure where I'd find that on the remote site), but it let me open the console and create/amend the database OK.
    Any help/advice appreciated
    Many thanks
    Allan
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      1. Don't use the CPanel installation.
      2. Move your zipped installation to the new site root - upload the zip file and unzip it in place (move the files to the site root if you have to) using the CPanel file manager.
      3. Create a new database with user using the CPanel database wizard.
      4. Edit the core/config/config.inc.php file to match the new database info.
      5. Upload the setup folder from the original 2.2.8 download.
      6. Run the setup.

      See how that works. You may need to check the config.core.php files in the root, connectors, and manager folders.

      Make sure your new installation's .htaccess file is correct if you're using friendly URLs. The RewriteBase will need to be just '/'.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 42511
        • 60 Posts
        Hi,
        Many thanks for the rapid response. I guess tghe rambling question I posted wasn't quite so clear as it ought to have been.
        I've got the site on the remote server where it was installed via cpanel(and I can't see that there's a setup folder there), but I'm trying to download it and install it onto a local machine that'll be running xampp(so I can give the users that to mess about with, as well as using it to try adding some custom tables and seeing what will work).
        I think that the problem might be that(oopsave the s just posted an ufinished reply) I haven't got a 2.2.8 setup folder as the remote install was done via cpanel.
        Maybe I'll have to do a new install of 2.2.8 into xampp, save the setup folder, remove xampp, reinstall xampp, load the files/db into xampp again then use the saved setup folder to try and install smiley
        Thanks
        Allan
        [ed. note: allan1 last edited this post 13 years, 3 months ago.]
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ok. Here's how I do it. Download and install the Vapor scripts in your remote installation, and run the script according to the directions here. Do make sure you are logged in to the Manager when you run the script, it needs the permissions to package up all the files. Download the transport.zip file that will be created in core/packages.

          Set up a new installation on your local host and make sure it's working. Put the package you got from following the Vapor instructions in the core/packages directory. Install it using the Package Manager as you would any other local package. You'll need to log in again part way through the installation; the login will be the one used on the remote system.

          You might need to edit the .htaccess file and change the RewriteBase to reflect your installation directory, for example '/modx/' instead of '/'.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 42511
            • 60 Posts
            Hi,
            Sounds like just the thing.
            Thanks very much for the help.
            regards
            Allan
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              The only problem I've ever run into using Vapor to move sites is if the site is too big; lots of large images, pdf files, etc, in which case using it from the browser will cause PHP to time out. Large sites need to have the Vapor script run via the SSH command line. Or, temporarily remove the folders full of big files, and transfer them separately.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 42511
                • 60 Posts
                Ran the script from the browser and it took less than 15 seconds - says it finished successfully!
                Just have to reinstall xampp and install revo 2.2.8. But that is going to have to wait until tomorrow or later as I have to go and do some paid work for a while smiley
                Thanks again.
                Just wondering - could the vapor script approach also be applied when uploading a site?
                regards,
                Allan
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  No, Vapor packages an existing site, and that package has to be installed on another existing site. As far as uploading a site, upload the original zip archive and uncompress it on the server, either using SSH or your site's control panel file manager (CPanel or some such). I have uploaded a PHP zip library and written my own simple unzip script when nothing was available on the server, and its PHP installation didn't have the zip libraries. Revo needs the zip libraries anyway, so if you don't have SSH, the server doesn't have zip, but PHP does, you can write a simple unzip script in PHP. http://scriptime.blogspot.in/2013/01/unzip-zip-file-with-php.html
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 42511
                    • 60 Posts
                    Hi,
                    I thought that something had gone wrong when I clicked on search for packages locally and it seemed to hang for ages, but I guess it was just unpacking everything.
                    Hit install then had to log in with the password from the remote site, so many times I thought I was giving the wrong password. It kept saying it had timed out - does it need the login for every package you had installed?
                    Thought the install had failed when I tried to log back in, but managed OK using a different browser so I guess it just needed the cache clearing. What I've tried so far seems to be working, so that's great smiley
                    Many thanks for the help that you've given with this and thanks for the guide on uploading a site also.
                    Do you think it would be possible to use vapor to package a 'local' xampp installation and then load that into a 'vanilla' installation of modx on a remote server, through package manager?

                    I think that the problems I was having with moving my site to xampp in the first place may be due to my having created a database and using the 'username' and 'password' from the remote site to create the database instead of the username 'root' and whatever password I had/hadn't set up for that(default in xampp is no password). But that's only because I had a problem trying to install modx and it took me a couple of shots before I found a forum post from someone who'd had the same thing.

                    I've installed xampp 1.81, it seems to run incredibly slowly under Windows 7, but it does work now smiley
                    regards
                    Allan




                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Vapor doesn't care where it gets run, and the Package Manager will install the package it creates into any existing installation. In fact, I usually use it either from localhost to a remote server, or from a MODx Cloud lab account to a different server. I don't know how well it would work with different versions; I've taken care to never try that.

                      Usually I only get the login request once. I have gotten it several times on one or two occasions, though.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org