Loading...
 

Convert a site installed via FTP to now use Git

  • With FTP, you upload / edit replace software files manually. If you edit a file, and later upgrade your site, you will lose your customization.
  • With Git, each software file is tracked, including any edits to the files. And thus, your changes are merged into the update.


Context: you are taking over a Tiki site that was installed by FTP, and you now want to use Git for easy future upgrades. You may also have some modified files, and via FTP, it's time-consuming to manage this.

Example


In this example we will turn an FTP tiki 20.x instance (which is tagged as such in Git) managed by Git.

We assume you are familiar with Get code.

  • website: http://tikiconvert.docker/
  • document root: /var/www/virtual/tikiconvert.docker/html

First backup your things


1. Create a folder to place your backups

Copy to clipboard
cd /var/www/virtual/tikiconvert.docker/ mkdir backup


2. Backup your database

Copy to clipboard
eval $(sed -n '/^\$/s/^\$//p' html/db/local.php) mysqldump -u$user_tiki \ -p$pass_tiki \ -h$host_tiki $dbs_tiki \ | gzip > backup/$dbversion_tiki.sql.gz


3. Backup your current folder

Copy to clipboard
tar -czvf backup/html.tar.gz html


Checkout the same version as your current Tiki install

checkout Tiki 20.x to folder newinstall
Copy to clipboard
git clone git@gitlab.com:tikiwiki/tiki.git -b 20.x newinstall


To reduce disk space, you can add the following parameter to the command above (before newinstall):
--depth 1 --no-single-branch

If you have a specific version like for example 20.0

checkout Tiki 20.0 tag
Copy to clipboard
git checkout tags/20.0


If you're experiencing issues in git clone, you can use https://gitlab.com/tikiwiki/tiki.git instead of git@gitlab.com:tikiwiki/tiki.git.


List of all branches
List of all tags

Copy your old site over the fresh Git checkout


Now copy your old site over the new install, if there are any modified or new files, they will override the ones of your checkout (the working copy but not the reference files in .git/ folders).

Copy to clipboard
cp -a html/. newinstall/


Check for differences

Copy to clipboard
git status newinstall git diff newinstall


If Git shows modified files, you should solve that before continuing.
If you are experiencing problems with files permissions you can disable git from checking permissions.

Copy to clipboard
git config core.fileMode false

Launch new instance

Copy to clipboard
cd /var/www/virtual/tikiconvert.docker mv html old && mv newinstall html


Test and remove old folder


Browse your website and check features you use are ok, after that remove old folder, but stick with your backup!

Copy to clipboard
rm -Rf old


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools