{"id":1396,"date":"2025-12-30T07:09:23","date_gmt":"2025-12-30T07:09:23","guid":{"rendered":"https:\/\/documentation.iqonic.design\/streamit-laravel\/?p=1396"},"modified":"2026-01-02T04:41:49","modified_gmt":"2026-01-02T04:41:49","slug":"mandatory-pre-update-steps-for-web","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/streamit-laravel\/mandatory-pre-update-steps-for-web\/","title":{"rendered":"Mandatory Pre-Update Steps for Web"},"content":{"rendered":"<div class=\"nolwrap\">\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Instructions<\/strong><\/h3>\n\n\n\n<p>This major update introduces <strong>database schema changes<\/strong> and <strong>media structure changes<\/strong>.<br>Skipping any of the steps below may result in <strong>permanent data loss<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1 \u2013 Take a Full Backup (Mandatory)<\/strong><\/h3>\n\n\n\n<p>Before starting the update, take a complete backup of:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Old code zip<\/li>\n\n\n\n<li>Database<\/li>\n\n\n\n<li>Uploaded media directory<\/li>\n<\/ul>\n\n\n\n<p>\u26a0\ufe0f <strong>Do not proceed without verified backups.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2 \u2013 Replace Application Files (Breaking Change)<\/strong><\/h3>\n\n\n\n<p>Upload and replace the <strong>new version files<\/strong> over your existing <strong>Streamit Web installation<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is a <strong>breaking major update<\/strong><\/li>\n\n\n\n<li>Replace the <strong>entire old code<\/strong> with the new updated code <\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3 \u2013 Temporarily Comment the Protection Code<\/strong><\/h3>\n\n\n\n<p>On your server, open the following file:<\/p>\n\n\n\n<p><strong>Path:<\/strong><br><code>\/app\/Providers\/AppServiceProvider.php<\/code><\/p>\n\n\n\n<p>Find the code below in <code>AppServiceProvider.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Event::listen(CommandStarting::class, function (CommandStarting $event) {<br>    if ((dbConnectionStatus() &amp;&amp; Schema::hasTable('users') &amp;&amp; file_exists(storage_path('installed')) )) {<br>        if (in_array($event-&gt;command, ['migrate:fresh', 'db:wipe', 'db:seed'])) {<br>            throw new \\Exception(\"\u274c Command '{$event-&gt;command}' is blocked in production.\");<br>        }<br>    }<br>});<br><\/pre>\n\n\n\n<p>\ud83d\udc49 <strong>Comment this code temporarily<\/strong> (do NOT delete it).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">        \/\/Event::listen(CommandStarting::class, function (CommandStarting $event) {<br>        \/\/     if ((dbConnectionStatus() &amp;&amp; Schema::hasTable('users') &amp;&amp; file_exists(storage_path('installed')) )) {<br>        \/\/         if (in_array($event-&gt;command, ['migrate:fresh', 'db:wipe', 'db:seed'])) {<br>        \/\/             throw new \\Exception(\"\u274c Command '{$event-&gt;command}' is blocked in production.\");<br>        \/\/         }<br>        \/\/     }<br>        \/\/ });<\/pre>\n\n\n\n<p>After commenting it, proceed with <strong>Step 4 and Step 5<\/strong> commands in your terminal.<\/p>\n\n\n\n<p>\u26a0\ufe0f <strong>Important:<\/strong><br>Once Step 4 and Step 5 are completed successfully, <strong>you must uncomment this code again<\/strong>.<\/p>\n\n\n\n<p><strong>Note:<\/strong><br>This protection code is added to prevent browser bots from automatically triggering commands like dummy data or other functions on some customer browsers.<br>Please <strong>do not forget to uncomment it<\/strong>, as it is important for security and stability.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4 \u2013 Run Database Migrations<\/strong><\/h3>\n\n\n\n<p>Execute the following command to apply required schema changes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"color: #080808\" class=\"stk-highlight\">php artisan migrate <\/span><\/pre>\n\n\n\n<p>\u26a0\ufe0f <strong>Do not continue if this command fails.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5 \u2013 Organize Existing Media Files<\/strong><\/h3>\n\n\n\n<p>This release introduces a <strong>new media directory structure<\/strong>.<\/p>\n\n\n\n<p>Run the following command to migrate existing media files:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"color: #090909\" class=\"stk-highlight\">php artisan media:organize<\/span><\/pre>\n\n\n\n<p>This command moves old media files into the new <code>public\/pictures<\/code> structure used by the updated version.<\/p>\n\n\n\n<p>\ud83d\udc49 After completing <strong>Step 4 and Step 5<\/strong>, <strong>uncomment the code from Step 3 again<\/strong>.<\/p>\n\n\n\n<p>\u26a0\ufe0f <strong> <strong>Note: If images are still not displaying after following Step<\/strong> 5<\/strong><br>If you have followed <strong>Step 5<\/strong> and images are still <strong>not displaying<\/strong> (only <strong>default images<\/strong> are shown), you will need to <strong>unlink the existing image storage link<\/strong> and <strong>recreate it again<\/strong> by following the steps below.<\/p>\n\n\n\n<p>1. Navigate to the <strong>public<\/strong> directory and rename the existing storage symlink to <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>storage-old<\/code><\/pre>\n\n\n\n<p>2. Recreate the storage symlink by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php artisan storage:link<\/pre>\n\n\n\n<p>After completing these steps, the image storage link will be refreshed and images should display correctly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6 \u2013 Verify System<\/strong><\/h3>\n\n\n\n<p>After completing the above steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Clear application cache<\/li>\n\n\n\n<li>Log in to the admin panel<\/li>\n\n\n\n<li>Verify media, content, and playback<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Important Notice<\/strong><\/h3>\n\n\n\n<p>This update modifies <strong>internal file structures<\/strong> and <strong>database schemas<\/strong>.<br>Applying this update <strong>without proper backups<\/strong> or <strong>by skipping steps<\/strong> can permanently damage your installation.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Instructions This major update introduces database schema changes and media structure changes.Skipping any of the steps below may result in permanent data loss. Step 1 \u2013 Take a Full Backup (Mandatory) Before starting the update, take a complete backup of: \u26a0\ufe0f Do not proceed without verified backups. Step 2 \u2013 Replace Application Files (Breaking Change) [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":1398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1396","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/streamit-laravel\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/posts\/1396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/comments?post=1396"}],"version-history":[{"count":25,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/posts\/1396\/revisions"}],"predecessor-version":[{"id":1488,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/posts\/1396\/revisions\/1488"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/posts\/1398"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/media?parent=1396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/categories?post=1396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-laravel\/wp-json\/wp\/v2\/tags?post=1396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}