I've been running CWIS for a long time and have migrated across many updates. As I was installing the latest version, I noted a much cleaner looking base install than what I see in mine. I see a lot of SPT--XXXXX.php files and Axis--XXXX.php files in the root directory for my app for instance, but not in the clean install folder. Can and should I be cleaning this up, and if so, how might I go about spring cleaning without breaking a working site?
Cleaning up File Structure of CWIS folder
Sun, 2016-04-24 22:57
#1
Cleaning up File Structure of CWIS folder
In recent versions of the software, the only two PHP files in the root directory of the installation are
index.php
andinstallcwis.php
, and the later is (not surprisingly) only used during install. However if you're using theBackwardCompatibility
plugin, it will also create several zero-length PHP files in the root directory, if they're not already present, to try to preserve compatibility with old interface files.The old files hanging around shouldn't hurt anything, but if it were me, I would want to get things cleaned up, if for no other reason than future compatibility. In the upcoming 3.9.0 beta release (and the 4.0.0 production release to eventually follow), some of the existing backward compatibility measures have been dropped, both to make the software easier to maintain and customize, and to support new functionality and improve performance.
In newer versions of the software, all of the data specific to the site (logs, uploaded files, etc) and all customized HTML, CSS, PHP, and JS files live under the
local
directory -- custom interfaces are now stored inlocal/interface
, uploaded images are stored inlocal/data/images
, uploaded files stored inlocal/data/files
, etc -- so once you're running in that mode, you can upgrade to a new version of the software with a completely clean tree just by installing the new version and then moving thelocal
directory into the root directory of the new install.So...here are the steps I would take, testing after each step to make sure nothing is broken:
BackwardCompatibility
plugin.config.php
from the root directory intolocal
(if it's not already inlocal
).index.php
andinstallcwis.php
.local/interface
.FileStorage
intolocal/data/files
.ImageStorage/Previews
intolocal/data/images/previews
.ImageStorage/Thumbnails
intolocal/data/images/thumbnails.
ImageStorage
intolocal/data/images
.Whether any problems arise during this will depend mostly on how much custom code you have in the site and what version of CWIS that code was written for and/or the site originally started with. In any event, if you dig into this and run into any issues, please post details and we'll see what we can do to help resolve them.
Thank you Ed, for this clear and prompt response. You've been a good shepherd of this project over many years. I'm going to give this a try and I'll report back if I run into any snags during my spring cleaning.
OERs Rock