How To Migrate Old Posts And Files To New Installation

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
sheriff
Posts: 16
Joined: Wed May 26, 2021 7:49 am

How To Migrate Old Posts And Files To New Installation

Post by sheriff » Sun Jun 06, 2021 11:32 pm

Upload or push (if they are already on the server) all uploaded and created files to your new /fp-content/attachs/ and /fp-content/content/ folders.

Make sure that the posts get pushed, cuz if there is already a similar named folder in the new directory, then you will need to go one directory deeper to be able to push those files and folders through ftp 'til you are completely done pushing all posts and files.

Go to the admin area and click the maintain tab, and then click purge cache, and then click rebuild index. (you might need to leave this page open if you do a lot of custom theme editing)

If you run into any internal server errors after adding javascript to the footer, and this causes a "Fatal Error" in your cPanel Error console, then put your javascript codes and links to javascript in the footer (very bottom) of the base directory /index.html file, and then make sure you purge your theme cache again before you refresh the page.

Refresh the home page when holding down shift and it should clear your browser cache before reloading the page so you can see all of your latest changes. :shock: This will also show you how fast or slow your page loads the first time somebody visits.

If you made edits that include extra javascripts, and this is slowing down your page, then I can suggest deferring all "<scripts" tags like this:

Code: Select all

<script src="/js/jquery-3.6.0.min.js"></script>
<script src="/js/jsplayer.js" defer="defer"></script>
Notice how I didn't defer the initial jQuery script and I loaded the jQuery first?

To speed up any CSS you have that is secondary to the main script, implement your css files in the header.tpl file like this:

Code: Select all

<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"></noscript>
<link rel="preload" href="/css/jsplayer.css" as="style" onload="this.onload=null;this.rel='stylesheet'" media="screen"><noscript><link rel="stylesheet" href="/css/jsplayer.css" media="screen"></noscript>
<link rel="preload" href="/css/tipuesearch.css" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="/css/tipuesearch.css"></noscript>
<link rel="preload" href="/css/common.css" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="/css/common.css"></noscript>
See how CSS is called in twice? It's a fallback for browsers that aren't using any scripts. Make sure to include your filename twice, meaning one in the link and one in the <noscript></noscript> link also like you see in the example above. If you need the script to load a particular css file faster when the broswer is rendering the page, then simply reverse that by including the link inside the <noscript></noscript> tag only like this:

Code: Select all

<link rel="stylesheet" href="/css/common.css">
See? Now the browser see this css file as important, so it loads it first now. The Noscript method makes your css files load later, after the initial rendering of the page itself.

sheriff
Posts: 16
Joined: Wed May 26, 2021 7:49 am

Re: How To Migrate Old Posts And Files To New Installation

Post by sheriff » Mon Jun 07, 2021 1:19 am

Update:

Go to jQuery plugin directory and edit the plugin to host your javascript files. /fp-plugins/jquery/plugin.jquery.php
If you have an updated version of jQuery and you host the file in your /js/ base directory,
then you would edit your file to something like this instead:

Code: Select all

		<!-- start of jsUtils -->
<script src="/js/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="' . $pdir . 'res/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="/js/jsplayer.js" defer="defer"></script>
		<!-- end of jsUtils -->
Make sure to delete any changes you made to index.php

Only place "$" codes inside of the base directory index.php, contact.php, login.php and search.php files. Example code:

Code: Select all

<script defer="defer">
$(document).ready(function() {
     $('.slide-screen').slide();
});
</script>
You would place codes like this at the bottoms of those pages so you can get the function to happen across all of the front pages of the site.

Sorry for the confusion, I am still learning.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests