![]() |
How do I Test Mods & Hacks without Messing up my Live Site?
Hello,
What is the best, most accepted, and common means of testing new site features and functionality, mods, hacks, etc? Do most of you have a second live instance of your site on the internet, which you just don't tell people about, used specificially for testing? If so, won't spiders still crawl the site and send traffic to you, although you don't want it? Do most of you download all the server side programs locally (mySQL, PHP, Apache, etc...) necessary to setup a testing server locally, and then just keep one live instance on the web? So far I've just been using one live instance, with no testing server, however when I make a mistake it sometimes can cost me some downtime. And often I tweak templates, that take me a while to correct and get exactly how I like. I hate to do all of this in real time on my site, where users are probably scratching their heads wondering what's going on. The problem seems, even if I do use a testing server (whether local or online) that whenever I make template mods (and a lot of times I'm working with two or three templates at a time) it will be a pain to have to remember what I've done, and manually go in and make the exact same changes to the live site once the changes are determined to be what I want. I'm sure that there is a protocol out there of how admins do this, PLEASE ADVISE! Thanks a bunch! Jeff |
I use a test site on my same servers (I have one webserver and one database server and use the exact same configuration for my test site). vBulletin allows you to have a test site up and running the same software as long as it is htaccess protected and not 'live', thus no spiders are crawling my test site.
After you get everything up and working correctly on your test site and you decide to upgrade your live site, you should export your styles. That way, when you upgrade your live site, you just import the styles and you don't have to redo all the template mods. |
Lynne,
Thanks for the response! I've only been using vB for about 6 months, so I'm sort of new to all of this. Few quick questions: A.) How do I initiate this htaccess protection (aka not live) as you mentioned. Is that a single setting, which then prevents your entire site from being crawled by spiders? Will that work on my vBa portions of the site in my root folder (dynamics, link directory, etc...), in addition to my forums? Will the site otherwise function the same, it just won't get crawled by spiders? Is there a particular naming convention for the URL, in relation to the actual live site, which vB finds acceptable? (I remember with my licensing they wanted to know the URL of my site.) Should I setup a subdomain of my actual domain: http://test.mysite.com? B.) When you say to import the styles, I'm unfamiliar with how to do that without uninstalling and reinstalling them. I'm currently offering 5 different styles to my users. How do I go about exporting them from my test server, to then import into my live site - as painlessly as possible? C.) Does your test site utilize the exact same database that your live site does, or a replica of it? Thanks a bunch for the ideas! Are there others who do this differently, or is this the accepted convention? Thanks! Jeff |
A.) This is from their License Agreement:
If you have a valid Software license, you may set up an additional test forum in order to test code, template and database modifications. To make this clear to us and our license verification procedures, place it in a directory called 'testvb' and be sure to password protect it. It must not be accessible by the general public. Mine is in a folder called 'test' and I have it available at test.mysite.org. This makes it easier for me to see exactly where I am at all times by hovering over any links. Here's something from vb.com on htaccess. I htaccess protect my Admin CP, Mod CP, and my test site directory. I'm not sure if you have some sort of server software like cPanel or webmin, but I just use that to protect the directories. It then popsup a window like what you see when you go to the members area of vb.com - it asks for a username and password that you set up - not your vbulletin username and password. Since you must know the username and password in order to see the test site, it can't be crawled by spiders. B.) If you go to your Admin Panel > Styles & Templates, one of the options is to Download or Upload the Styles. So, I download it from my test site and then after I upgrade my real site, I upload the style to my real site and it overwrites my old style with the new one which has all my newly modified templates. |
C) Ofcourse a copy of your production database. Otherwise you would be testing on your production data. :eek:
B) Also look into Parent / Child styles to minimize template editing. |
Thanks for the feedback Lynne and Marco!
So to upload my test site, can I just download my whole site via FTP and then upload it again by the same means into a different directory? And this will work to completely restore the site, including template mods, hacks, modules, etc...? Thanks! Jeff |
Copy all files.
Make backup of your database Create a new database and restore the backup into this new database. Update the config.php in your test install to point to the new test database. If needed update Forum URL and Cookie settings in your vBulletin Options. That should be all in most cases. |
One concern that I have, is by placing the test site online in a different folder, it will break some of my links on the site that have been hard coded.
Is there a better solution, or is this what most admins do? Thanks! Jeff --------------- Added [DATE]1203348215[/DATE] at [TIME]1203348215[/TIME] --------------- Quote:
However when I use my FTP client, and I right click on the directory that I'm going to put my test site in, I can select file attributes for that directory. The options are as follows: Owner Permissions/Group Permissions/Public Permissions - with the following check boxes for each category: Read/Write/Execute. Will this accomplish the same thing? Would I just uncheck all three boxes in the "Public Permissions" file attributes? Would I also need to alter the Group Permissions? Is this the same as the htaccess protection that Lynne is speaking of, or is this something totally different? If it is different, does anyone use 1&1 and can you tell me where to find these controls? Thanks! Jeff |
Owner/group permissions are different than the .htaccess directory protection we have been talking about. Here is a good page the will explain .htaccess protection: http://www.javascriptkit.com/howto/htaccess3.shtml
Sorry I missed C. above. I didn't see if for some reason. When I set up my test board, I make a copy of my database and copy it into a new database (like test_db) and copy all my attachment, avatar, torrent files and move them all over to my test directory. So, now I have all the information from my real site over on my test site. Then I upload the new php files from vbulletin and run the upgrade script. Then I install all the mods I need. I actually also have a little notebook that I keep notes in with the names of all templates I modify and all php pages I modify and a little note of why "mod to remove torrent", "mod to add spider count", etc. It's not a perfect method, but it helps me out a lot. I don't like having the site down for long, so if I have everything all neatly in order, I can upgrade my site a lot quicker. I recently upgraded from 3.0.12 to 3.6.8 and I only had the site down for less than two hours and that's due to all the preparation I did on my test site to get ready for that upgrade. I had some custom mods that aren't all plug-and-play, so that was pretty good timing for me! As for you hardcoded links, you might want to take a look at them and see if they need to be. My navbar isn't standard vb because I have pages 'outside' my forums folder, so I actually 'hardcode' the link, but I do that by just putting "$vboptions[bburl]/" in front of all the links. It gets that variable from the vboptions. So, as long as it is correct in there, then I am fine. There are some threads with hardcoded links, but those don't affect my testing. |
Thanks again for all the help Lynne! I'm working on the .htpasswd file now!
One question does come to mind, with the .htaccess protected directory (my entire test site), how do I request help from others on public forums such as this one and vbadvanced? I have a lot of situations where I post a link to demonstrate the problem I am encountering, for whoever reads and responds to my post. Is there a work-around for this with .htaccess, or do I need to temporarily disable it in times like this, or what do most admins to to facilitate this? Thanks! Jeff --------------- Added [DATE]1203356514[/DATE] at [TIME]1203356514[/TIME] --------------- Quote:
Thanks again for all your help! Jeff --------------- Added [DATE]1203357503[/DATE] at [TIME]1203357503[/TIME] --------------- Quote:
I understand the concept you are trying to get accross to me, but I must have missed a step somewhere. First of all, I don't remember where to find the 'config.php' file. Second, for some reason I can't log into my ADMINCP. I'm assuming that I need to change a few settings, defining where the site is located, etc... Do I not need to tell it where it is located (the full path) etc... or is that just with my vBa products? When I try to log into my test site AdminCP, I get the following error: Quote:
Also, since I have not been able to redirect the database yet, it appears to be pulling the data from my live site by default. Any assistance would be appreciated! Thanks! Jeff |
Quote:
Quote:
I see a few people have said they don't even use a test site. I'd love to hear about how they upgrade their sites without first doing things on a test site. My site would have been down for a month if I didn't use a test site to rewrite all my mods when I upgraded from 3.0.12 to 3.6.8! Sure, I found some plug-n-play mods here to replace others I had installed, but I had to totally rewrite the mods I have made on my own for my site. That took quite some effort and a LOT of testing (and added a few gray hairs)! --------------- Added [DATE]1203358309[/DATE] at [TIME]1203358309[/TIME] --------------- Jeff, are you sure all the files are uploaded (the ones your error messages say it can't find)? Also, make sure the permissions are OK - the ones you reference above "following check boxes for each category: Read/Write/Execute." See what they were marked as on your live site and make sure they are the same on your test site. |
Hello Lynne,
For me it stands to reason that a test site is the only way to go, without excessive downtime. Now I'm just trying to learn the most painless way of doing that. I'll double check the files, but I FTP coppied the entire site and it said that it coppied fine. I'll manually check though. Thanks again! Jeff --------------- Added [DATE]1203359446[/DATE] at [TIME]1203359446[/TIME] --------------- Dang! FileZilla let me down! A bunch of files are missing on my test site. I will have to download and re-upload again. (I probably should have thought of that one on my own... I automatically figured it was a configuration issue.) Thanks for the help Lynne! Jeff --------------- Added [DATE]1203364612[/DATE] at [TIME]1203364612[/TIME] --------------- Hello again. I deleted and completely re-uploaded my test site and all contents. I've compared directories, and according to FileZilla, they are identical. Now when I try to log into my AdminCP, it all appears to work fine, with one small exception: after I type in my password, and it gives me the "Thankyou for Logging In" splash screen, it goes directly back to the log in screen, as opposed to entering the Control Panel. I've tried this with the Moderator CP and it is doing the same thing. Anybody got any ideas what the heck is going on here??? Thanks for any assistance! Jeff |
heres what i done download this http://sourceforge.net/project/showf...ckage_id=48193 its basically a desktop server for local testing purposes copy all your site over to it just as good as testing on your live site
|
Ok, so I tried this with Firefox instead of IE (which I primarily use) and it actually DID log into my Control Panel, but STILL a problem (I thought that maybe it was a cache issue, but apparently not):
Although the path in my browser told me that I was in the Control Panel for my TEST site: all of the changes that I made actually occured on my LIVE site as well.So I went back and forth between the two control panes (live and test site) and any changes which I made on the one, would show on the other. So for some reason, I'm obviously logging into my live control panel, though it says it is on my test site. I have no idea in the world why! To add insult to injury, I discovered that my .htaccess protected directory was extending beyond my subdomain directory and for some reason including my primary domain directory, though they are completely separate and unrelated folders. I have several other domains/sites in the same shared hosting root directory as these two folders are in, however none of my other sites were affected by the password protection. I've had to temporarily disable the .htaccess password protection of both directories until I can figure out what is going on, and how to only apply it to the test folder. I'm lost! Can anyone help??? Thanks. Jeff --------------- Added [DATE]1203366838[/DATE] at [TIME]1203366838[/TIME] --------------- I'm finally getting desperate enough to read the vB users manual! I'm seeing that vB recommends performing backups through the AdminCP > VBulletin Options > Backup/Restore Settings and INDIVIDUALLY backing up each product including vB, then restoring them in a simular fashion. Is this what I NEED to do, or can this be done via FTP? FTP seems like a much quicker and simpler method IF it will work correctly, but so far I've not had any luck. Please advise. Thanks! Jeff --------------- Added [DATE]1203367652[/DATE] at [TIME]1203367652[/TIME] --------------- These are itty-bitty xml files that seem to include standard settings and values, but don't appear to include any hacks or phrases that I've modified, etc... Surely this isn't the best way to do this. FTP must be the way to go, but why won't this work for me??? Please help! Jeff --------------- Added [DATE]1203368660[/DATE] at [TIME]1203368660[/TIME] --------------- Quote:
Thanks for the feedback. Is it easier to use a local test site than one online? Do you just copy the entire site via FTP to your local machine? After you download that server package, are you ready to start working on your site right away, or do you have to do something special to configure your site for your local machine? (Change paths, etc... ?) I'm also wondering if the programs in this server download package will continually run in the background on my machine (taking up resources) or just launch when I'm working on my test site? Thanks again for the help! Jeff |
hi jeff,
I'll quote these instructions from another site. Quote:
regards bazz |
Jeff, did you make sure to change your includes/config.php file to point to the test database and not your live database?
|
Lynne,
Actually I didn't remember where to find the Config.php file, until you just told me, in the includes folder. Now I have gone ahead and implemented that, and double checked the settings. Now, thankfully, I am no longer pulling the data from my LIVE site on my TEST site, however, instead I am getting a slew of database errors: Quote:
Am I supposed to go into phpMyAdmin through my server control panel to first import this data? How should I proceed? Thanks again for all the help!!! Jeff (I feel like we are getting CLOSER!) |
Jeff, if you aren't using a copy of your live database, exactly what database are you using for your test site? You need to use a populated database or you will get errors such as "table doesn't exist" :)
|
I setup a new database through the same ISP (1&1). It just doesn't have any data in it yet. I thought that the order of events was to create the database, path it, and import my data from a backup of my live site.
I already have the backup of my data from my live site, now how should I go about importing that into my new TEST database? Thanks! Jeff --------------- Added [DATE]1203379139[/DATE] at [TIME]1203379139[/TIME] --------------- I'm guessing that this is the answer to my question: Restoring the Database via phpMyAdmin. I'm currently trying to do this, but having problems. I'm going to contact my ISP for support. I would still be interested in hearing people's reasons for prefering either online or local Test sites vrs. the other. Bazzup, thanks for the info on Uniform Server. After I get this work online (if I can), I'm going to look into that for local presentations of the software. It definately appears to be a simple and low load solution! Thanks again for everyones help! Jeff |
Quote:
Did you backup the live database through ssh? you should have done a mysqldump doing a call like: "mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL" where USERNAME is the mysql server username from your config.php file and DATABASENAME is the name of your live site database from the live server config.php file. It should ask for a password, also the same from the config.php file. Then to import it you would do something like: "mysql -uUSERNAME ?p TESTDATABASENAME < /PATH/TO/DUMP.SQL" again with only this time the name of the database is NOT the live site database name, but the TEST SITE database name (from the TEST SITE config.php file). It probably has the same username and password, I would guess. |
Lynne,
I backed up the live site database through my vB AdminCP>Maintenance>Database Backup. Is that ok? I'm on hold with my ISP right now. They're phpMyAdmin control panel is not allowing me to import a file over 8mb to restore the database, and my file is 13 MB! So they are having to import it via the SSH option for me, as I don't have SSH permissions on my account. I need to find a new host for this site. 1&1 only allows a max database size of 100MB. They will allow me multiple databases, but their max. file size is still 100MB per data base, which is not going to be enough. I've heard that SiteGround.com has awesome prices for forum sites, so I've been planning to look into making the switch once my site got up and running. I was just trying to hold off on getting another monthly expense, since I already had the shared hosting package through 1&1. I was thinking that without the data, I would still get my site looking like the day I purchased it from vB, just without content. I was forgetting that vB uses the database to store a lot of settings and internal data besides just the threads and posts. So I have to run the upgrade script after this database gets restored? I wasn't anticipating this step. What will the upgrade script do in this instance? I'm also curious, if later on, I want to update the data in my TEST site, how do I OVERRIGHT the data that I'm currently importing into the test database tables? Also, how do I know which settings I change are stored in the database? So basically, if you make changes on your test site that are stored in the database, you have to go in and manually make the same changes again to your live site, since there is no way of automating this process once you like the changes, is that correct? So do you just use this for modifying templates and installing mods? If I go in and edit phrases and things like that, a test site really won't help much will it? I'm a little confused. I was hoping that a test site would be as simple as testing all changes and functions, then once you work the bugs out, upload it to the new site. It seems that there is a bit more to it than that. Can you give me an idea of what you realisitically use it for, and what types of changes are more a pain than their worth in a test environment? Thanks a bunch! Jeff --------------- Added [DATE]1203412348[/DATE] at [TIME]1203412348[/TIME] --------------- It's been a long day, but I think that I've got this all worked out now. (Thanks to all your help!!!) After I got my database restored to the new test database, and the config file setup correctly, the two sites (live and test) now seem to be operating independantly. Once this was done correctly, I was able to reinstate my .htaccess password protection on my test site, without it affecting my live site anymore. I still have a couple of outstanding questions which I would like to understand, if anyone would be so kind as to answer: First I did not run the upgrade.php, and I want to ensure that is OK. The reason I didn't run it, is because I am not wanting to modify my site version prior to 3.7 going gold. I'm simply wanting to setup a test site at the moment for any mods/hacks. Did this need to be run for some reason, even without actually upgrading to a newer version of vB? Am I correct in thinking that any settings which I change, or hacks that I implement are stored in the DATABASE except for the templates for each style? Or maybe the templates are too, but they can be downloaded and then imported into my live site? I'm confused about what changes I should try to make on my test site, and what I shouldn't bother trying to do because I will still have to go manually make the same changes on my live site afterwards. Can someone please explain this to me? What changes are worth making in a test environment? Initially I thought that I could test ALL changes, and then simply FTP overwright my live site with my test site after I work out all the bugs. This seems to NOT be the case though, for two reasons: First with an online test site some of the pathing would be different. Surely I could try to minimize this, but still SOME would be different. This may be avoidable with an OFFLINE/LOCAL test environment, if the .htaccess file will allow ALL site variables to remain the same, however there still is another problem: any settings or changes stored in the database will not upload along with the test site when I overwright my live site. I don't see any way around this, since there is no way for your test database to stay current in Real Time, with the data that has been entered via posts & threads, since the time when the test environment was created. Unless there were some sort of a mirroring of the data, which I'm unfamiliar with in this application. Do Admin's who use local test sites find it more helpful to do so? Do they really NOT have to modify any site variables? Can they simply FTP overwright their live site with their test site once the work is done? How is it better and why does it help? So, how do admins really and truly get the MOST out of a test site? Do they typically only use it for template modifications and upgrades? How can I use this to my best advantage? I'm also curious, if later on, I want to update the data in my TEST site, how do I OVERWRIGHT the data that I've just imported into my database? Is there some way to flush out the database and reload it? Or must I create a new database and simply delete the old one, forcing me to redo a bit of configuration work? I have one last question I mentioned earlier, for Marco or another vB staffer: With my entire test site directory .htaccess protected, how do I request help from others on public forums such as this one and vbadvanced? I have a lot of situations where I post a link to demonstrate the problem I am encountering, for whoever reads and responds to my post. (This could be anyone.) Is there a work-around for this with .htaccess, or do I need to temporarily disable it in times like this, or do I need to publically post a temporary User Name and Password, or what do most admins do to facilitate this? Thanks again for everyone's help! Thank you especially Lynne for all the time you took to help me today! :):D:) Jeff |
Quote:
|
Jeff, you asked about the purpose of a test board. I use it to test out anything prior to putting it on my live site. But, besides that, the major thing I use it for is upgrades. For instance, in December I finally upgraded my board from 3.0.12 to 3.6.8. I started in November by taking a copy of my live database and putting it up on my test board along with the 3.6.8 php pages and running the upgrade script. Then I installed all the hacks I needed and rewrote the ones I had originally written. After I had it running how I wanted, I took down my live site for an upgrade. Then, I knew I had a couple of other mods to write, so I did them on the test board, exported the product and then imported the product onto my live site. The product/plugin system makes it very easy to move a mod from the test site to your live site. Currently, I have upgraded my test site to 3.7 (only beta 2 at the moment). I am now rewriting some more of my hacks to take advantage of some of the changes made to 3.7. I would never install a hack directly onto my live site without first checking it out on my test site. Of course, I am also one of those that rarely uses a hack as-is. I always seem to want to tweak it a bit for my site.
|
Quote:
So just to make sure I understand, say you are upgrading your site to the latest and greatest version, after you get your test site setup, hacks and mods to your happiness, everything running smoothe, how then do you move these changes onto your live site? You said that you did it all with just a couple of hours of downtime, which is impressive! Do you delete your live site folder and then recreate it by copying your test environment via FTP? Then you would just have to reconfigure the database to use your live data. And you would likely have to redo any changes done in your test environment which were stored in the database. Or do you simply run the upgrade script on your live site, import the templates from your test site, individually import each plug-in from your test site, and manually make any other changes that you've made where the settings are stored in the database? You manually write these in your notebook as you implement them on your test site, then you manually implement them on your live site as well during this process? Which would best describe how you actually do this? I just want to understand how best to take advantage of a test site myself. I don't want to do something the "hard" way if there is an "easier" way that most of the world is doing it. Thanks ever so much! Jeff |
Quote:
|
Thanks again for the feedback Lynne!
You have really helped me a lot, through this learning curve! :) Jeff |
Ok I installed new testvb on to my server, right next to my live forums
1.How exactly to copy php database ? I got 'PUTTY' SSH program, can connect to my server but not shure about that codes Iam afraid to do some demage and mess up thing...so I was thinking its better to ask first you guys My live forums are in mydomain/forums and my testvb is installed in mydomain/test/testvb (pasword protected for general public) 2.Which files except php database I should copy from my live forums to my test ones ? Customavatars,customprofile pic,images,signature pic....maybe its easyer to say which one I should not ? 3.How about blogs and my VBADynamics(VBA is installed outside of my forums, in a root) Will I be able to test everything good cuz VBAD, I use this mod just for a my front page!? 4.Through Admin CP, I should download styles, and upload them to my testvb something else through admin cp, plugins, products and stuff ? ----------------------- Iam having Vb just about two months, nothing is that hard to do but for guys as me can be real pain in.... cuz Iam not familiar much with HTML CSS and... Menaged a lot to do for these 2 months but I need real bad this testvb When I have this copy of my live board I will do more things by myself and will not bother Vb stuff and Vb.org guys that much in future :D Tanks in advance for help Details will be highly appreciated |
All times are GMT. The time now is 11:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|