Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
What's best to upgrade to 4.6.2 in a separate environment?
Hello,
I’m back after a couple of years. I’m running a 4.5.7 install and want to plan an update to 4.6.2 or to 4.7 when it’ll be out of beta. Let’s focus on 4.6.2.
I’d like to do the following:
- Install 4.6.2 on a different folder on my server
- then have the same db of my 4.5.7 install copied or shared (what’s safer? I suppose copied) and make the 4.6.2 to point to that one.
- then I’ll have the time to do both a complete change in my theme, and try/update the plugins in order to make sure everything works, on the same exact base of artcles, comments, images and files of my current install.
I’d better do it online rather than on my hd, for different reason, the first being I’m not always on my desk and change computer often.
What’s the best way to accomplish this? I already tried to both upgrade my current install live (got a bunch of errors and reverted to backup) and to install a brand new version on a subfolder, but haven’t been able to make it work with a copy of my db.
Ideally, I’d be fine with making a fresh install, and then on the fresh install import just the articles, images, files and comments db tables + folders.
Is there a safe way to to this?
Some better (read: easier) ideas?
Thanks
M
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
I would definitely backup the MySQL DB and also clone it to a new DB.
You can then install 4.6.2 in a subfolder and point to the backup db and update to the site.
What i do in many instances when i try big updates of many versions, is try it on a new domain. i have a couple of “dormant” domains on my server and i simply use that with teh backup DB and the nupdate. Of course you need to edit the mysql dump and search and replace all urls: olddomain.com to the newdomain.com
then run the update to see if any problems arise. If none you can run it in the exusting site… again have a backup of the DB and the SITE
…. texted postive
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
Thanks Bici.
That’s what I actually tried: installed in a subfolder and pointed to a cloned db. But something is not right. The frontsite home of the subfolder install is a 404 and I can’t access admin area because on subfolder/textpattern url i get:
Fatal error: Class ‘theme’ not found in /home/XXXXX/public_html/subfolder/textpattern/lib/txplib_misc.php(1782) : eval()’d code on line 1420
I’m not sure what to do. Maybe I should edit something in the db, but I don’t know what.
Also, the setup script in this way is not run on the db, so I ask myself if this could be a problem.
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
hi – read this doc to see if you are doing all the steps.
…. texted postive
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
Uhm. Thanks, I read it, and tried but failed to find the “browse” tab in phpMyadmin in my language… :)
Anyway, I tried a different route just to understand what happens using the same cloned db on a fresh installation of 4.5.7 in a new folder. In that case, I can access to the admin area! Strangely enough, though, I can’t manage to get over the language update page. The updates of lang don’t work and any other admin tab fail to load.
The database is a copy of another 4.5.7 install. I suppose I should change something about path in the preferences, but I can’t from textpattern itself because I’m stuck on the language page.
Anyway, doing the same with a 4.6.2 install in another folder, throw the above mentioned error and I can’t even access admin area. So there’s definitely something with 4.6.2 update and my server environment (apart from preferences edits).
PHP 5.6.34.
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
Zanza, see if this thread and the threads it links to offer any help with the “stuck on language page” problem. There’s another thread too on the forum where people were on a version just below 4.5.7 and had to update to that first before upgrading to 4.6.2.
Zanza wrote #310302:
A fresh installation of 4.5.7 in a new folder / … install in another folder, throw the above mentioned error…
A bit of a long shot, but if you’re working on an install in a subfolder of a domain – i.e. that folder is not the web root and you’re accessing it as mydomain.com/subdirectory/
– then try either:
- setting up a subdomain with your host, e.g.
test.yourdomain.com
and pointing that to the subfolder, then try accessing your site and proceeding with your update ontest.yourdomain.com
(this method avoids. - if that’s not possible, try setting RewriteBase in your .htaccess file so that rewrites run from the subfolder, e.g.
RewriteBase /subdirectory
(and remove the # at the beginning of the line) so that textpattern rewrites its links to use the subfolder.
TXP Builders – finely-crafted code, design and txp
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
Thank Jakob, modifying the txp version via phpMyAdmin did the trick.
Actually, I had already tried the cloned db with a 4.6.2 install, and that wrote the version in the db prior to using a 4.5.7. install.
I’ll try your suggestion to use a subdomain, too, as my home page in the subdir is shown but without articles (the db is similar to the one I use in the root of my webserver, and even if I changed the path here and there, I suspect there’s something that tell TXP that is not the home page). Also all the listing are not working. The templates are there but empty.
If there is any document that explain where to change all the paths when moving in a subdir, can someone point me there?
Then, I’ll try to upgrade that version to 4.6.2, to see if I can get that work. I’ll let you know.
Thanks
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
I’ll try your suggestion to use a subdomain, too, as my home page in the subdir is shown but without articles…
It sounds like there are multiple things not working as expected. The subdomain method should at least give you the same working conditions as your regular installation, so you don’t need to deal with the subdirectory problem.
What I usually do is use a directory next to (rather than inside) the old site for a new site or subdomain, e.g.:
/path-to-account-root/www/oldsite --> www.mydomain.com
/path-to-account-root/www/newsite --> test.mydomain.com
You’ll need to adjust your paths in your config.php in /newsite
to match the new path. You can then experiment on test.mydomain.com (or whatever you choose as a subdomain name) until you have everything working how you want.
Then, you just “unhook” the test.mydomain.com subdomain, point www.mydomain.com to /newsite
(or whatever) and update your textpattern preferences for site_url and your new site is live. That may depend on how your provider lets you assign (sub)domains and directories.
TXP Builders – finely-crafted code, design and txp
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
Zanza,
I know it is a basic question, mentioning it here so as to avoid an oversight. Do your php/mysql versions support the requirements of txp4.6.2?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: What's best to upgrade to 4.6.2 in a separate environment?
jakob wrote #310312:
It sounds like there are multiple things not working as expected. The subdomain method should at least give you the same working conditions as your regular installation, so you don’t need to deal with the subdirectory problem.
Thanks, that’s something I was thinking to do for my convenience in the future, but as of now I already have my root as my primary folder for the domain. I should move everything in a subfolder and then set the server (the hosting should let me do that, as I understand), and given the trouble I’m having with my tentative secondary installation/upgrade, I’m hesitant to do it now. But I’ll surely think about it in the future.
Not sure what’s preventing all the listings of articles, both in home and section pages, to appear in my subfolder install, and where to set what. I’m still pointing to files and images original path, but path_to_site is to the subfolder. That shows up correctly in diagnostic, but in diagnostic there is also an information about root of the site that point to the original root and not the subfolder. I can’t find where to change that, both in config.php and in txp_prefs table with phpMyadmin. Could be what’s preventing the articles to show up?
@colak: It seems so. I’m running 4.5.7 correctly on my main installation, and have MySQL: 5.6.36-82.1-log and PHP 5.6.34, that should also be enough for 4.6.2.
Offline