Article

  • 5 days

    19 hours

    YetiShare / Core

    44

How to Upgrade Yetishare

Upgrade Existing Install - Your Current Version 5.x

Use this method if you are currently using Yetishare and on a version in the v5.x range.

Required hosting change (new in this release): the public document root must contain only the former web/ files (front controller + public static assets). Private code (app/vendor/_config.inc.phplogs/, private cache/) must stay above that document root. Prefer pointing the host document root at web/; on locked cPanel public_html hosts, place the contents of web/ into public_html/ and keep private files in the parent directory. See Step 5 below. If you use Nginx, replace your existing rewrite rules with the updated configuration in ___NGINX_RULES.txt at the project root.



Step 1. Backup Existing Code & Database

VERY IMPORTANT! - Before you do any changes to the code at all, ensure you've taken a backup copy of the site, files & database.

 

Step 2. Uncompress Downloaded Zip File

Open the downloaded zip file on your computer and extract the files into a new folder on your desktop. If you can't open zip files you may need to download a zip client such as WinZip.

Ensure web/.htaccess is present after extraction. Some operating systems hide files that start with a dot; show hidden files if you cannot see it. The site will not rewrite URLs correctly without it.

 

Step 3. Import Database Patches

Within your hosting control panel, load phpMyAdmin (or similar) and select your database. In the right-hand section click on 'import'. Attach the the relevant sql patches from the directory `/install/resources/upgrade_sql_statements/` and submit the form. Choose the patches after your current script version number up to and includingv6.1.0, ensuring you do them in version number order.

For example, if your current script is v5.6.0, you should import the patch for v6.0.0.

 

Step 4. Upload Files

Using an FTP client such as FileZilla, first delete the contents of app/plugins/themes/vendor/ and web/ on the server. Then upload the matching folders from the new release into those locations. Keep your existing database credentials in _config.inc.php - do not overwrite that file with an empty release template unless you intend to re-enter the settings.



Step 5. Set Public Document Root

IMPORTANT - this was not required on previous 5.x releases.

Preferred (VPS / flexible hosts): set the site document root / public folder to the web/ directory inside your Yetishare install. Examples:

  • If the script lives in /home/you/yetishare/, set document root to /home/you/yetishare/web (not /home/you/yetishare).
  • On cPanel / Plesk / similar panels, change the domain "Document Root" or "Web Root" so it ends in /web when the panel allows it.
  • Apache: set DocumentRoot to the web/ path and keep using the bundled web/.htaccess.
  • Nginx: set root to the web/ path. Replace your existing Yetishare Nginx rewrite rules with the updated configuration in ___NGINX_RULES.txt at the project root (front-controller routing plus the internal /files/ location for X-Accel-Redirect downloads). Old rules that assumed the document root was the project root will not work correctly after this upgrade.

Locked cPanel public_html (cannot change document root):

  • Keep private files in the parent of public_html (app/vendor/plugins/themes/cache/files/logs/_config.inc.php).
  • Place the contents of the release web/ folder into public_html/ (replace old public files). Ensure public_html/.htaccess is present.
  • Do not leave app/vendor/, or _config.inc.php under public_html.

PHP source (app/), config (_config.inc.php), vendor/logs/ and the private cache/ must stay above the document root and must not be web-accessible. After changing the root, reload the site homepage and confirm the public URL still works before deleting /install.

Step 6. Set Folder Permissions

Using your FTP client, ensure CHMOD 755 permissions are set on the following folders: /files/logs/cache/plugins, and the public document root's assets/ and cache/ (i.e. web/assets + web/cache, or public_html/assets + public_html/cache).

Step 7. Purge Script Application Cache

Login to your script admin area. On the dashboard scroll down and click "Purge & Resync All Assets". Alternatively from the site root (as the web-server / file owner): php app/tasks/purge_resync_assets.cli.php

Step 8. Ensure Cron Tasks Are Setup

Yetishare uses a number of cron (background) tasks to ensure redundant files are deleted, accounts are auto downgraded etc. Details of these are below. You can leave these until later if you want to test the upgrade first. See here for more information on cron tasks.

0 0 * * * php /var/www/html/app/tasks/auto_prune.cron.php >> /dev/null 2>&1
0 0 * * * php /var/www/html/app/tasks/create_internal_notifications.cron.php >> /dev/null 2>&1
0 * * * * php /var/www/html/app/tasks/delete_redundant_files.cron.php >> /dev/null 2>&1
0 0 * * * php /var/www/html/app/tasks/downgrade_accounts.cron.php >> /dev/null 2>&1
*/5 * * * * php /var/www/html/app/tasks/process_file_queue.cron.php >> /dev/null 2>&1
0 1 * * * php /var/www/html/app/tasks/create_email_notifications.cron.php >> /dev/null 2>&1
* * * * * php /var/www/html/app/tasks/process_server_resources.cron.php >> /dev/null 2>&1
* * * * * php /var/www/html/app/tasks/process_server_monitoring.cron.php >> /dev/null 2>&1

 

Finished!


Congratulations, you've completed the upgrade! Feel free to contact us or post on our forum if you have any problems.