Skip to main content

Ricardo Mendes

How to backup @withKnown & restore it easy #indieweb

5 min read

Context : 

Yesterday I was making incremental changes to my CSS - while having CloudFlare caching enabled - and for some reasons, some broken CSS changes managed to stay in the CloudFlare Cache and were being served even though this website had the CSS fixed. in short the CF cache was serving broken CSS files while the original site wasn't displaying the same broken CSS rules anymore. This is how it looked like : http://prnt.sc/bw8ao5

Instead of thinking : let's disable all the cache system while I work on my CSS, I was convinced if the site was rendering this way, I was the one responsible for the broken CSS so I activated my quick "maintenance mode" solution and moved to the next step.

So I thought let's go back to Known default to see what part of my modification are responsible for this mess. 

  1. disable any Custom.css
  2. revert back to Solo Known default theme
  3. if no changes, it means my Known install is broken in someway
  4. This is where I should have thought about disabling CloudFlare cache but I didn't
  5. I went on hunting from where my problem was coming from and the first step was to make sure my Known code was clean, so I decided to re-backup my site and eliminate each factor until finding the culprit. 

Steps : 

  • Save your Custom.css 
  • backup your var/www/Uploads folder
  • backup your var/www/IdnoPlugins folder
  • backup config.ini file
  • backup your .htaccess file
  • you could backup your database too. (depending on your host this might already be done everyday)

This is the basic steps to backup your actual Known configuration. 

Once you have done this, rename your root folder to a backup name and proceed to install Known from scratch. 

git clone https://github.com/idno/Known back to your /var/www/ folder

make sure to copy back your Uploads folder & your config.ini file and your .htaccess file. 

once it is done, refresh your website, you should see Known default theme and your website up & running. 

you can restore the plugins later (see below) and the custom.css

It's only when I did all these steps and found out my Known site was still broken that I thought : OK this is not me, let's check out with my host if they have changed anything server side (they didn't) and while talking with my support at Dreamhost, the helper suggested to bypass Cloudflare cache while modifiying my site template.

CloudFlare was still activated & running and my broken CSS was still breaking all the website. The moment I disabled it, refreshed my website, the broken CSS was gone and my problem was gone. 

Note to self : Never work on your website with CloudFlare caching system enabled.

In the meantime I had made all these steps to debug my problem and decided to write about it and share this experience and this is the post you're reading :)

OK so how to go back to a working Known with all my plugins back ? 

How to re-install/update Known plugins from the terminal ? 

The naming convention of Known Plugins is as follows : 

if one word : 

Facebook

if two words : 

InstagramShim

notice Capital letters for First letter of the word.

some plugins still have remain of Idno denomination, but beside "IdnoOpenGraph" plugin, take out "Known" or "Idno" from their name. to make sure check out each plugin github description to make sure but if your site is broken after enabling a plugin for Known, move it from the IdnoPlugins folder, rename it correctly and move it back to the plugins folder.

Themes for Known : 

https://github.com/physcocode/Material

- list of plugins I like to use

https://github.com/idno/Twitter

https://github.com/idno/Facebook

https://github.com/mapkyca/KnownLinkedin

https://github.com/mapkyca/IdnoOpenGraph

https://github.com/mapkyca/IdnoEmbeddedPosts

https://github.com/mapkyca/KnownLightbox

https://github.com/mapkyca/KnownEmoji

https://github.com/idno/Presentation

https://github.com/idno/Subscriptions

https://github.com/mapkyca/KnownAkismet

https://github.com/mapkyca/KnownGithub

https://github.com/mapkyca/KnownChrome

https://github.com/mapkyca/KnownIRC

https://github.com/mapkyca/KnownSitemap

https://github.com/kylewm/KnownReactions

https://github.com/kylewm/KnownInstagramShim

https://github.com/timmmmyboy/WordPress

More Post Types : 

https://github.com/tinokremer/KnownJournal

https://github.com/cleverdevil/Known-Reviews

https://github.com/cleverdevil/Known-Recipes

broken admin : 

https://github.com/timmmmyboy/Tumblr

Third party services you might alreayd use : 

https://github.com/mapkyca/KnownBuffer

https://github.com/timmmmyboy/Pushover

https://github.com/mapkyca/KnownAppNet

https://github.com/Decentralized-Sharing-Working-Group/idno-file-picker

source : 

http://docs.withknown.com/en/latest/plugins/community/

- commands to run in your /root/IdnoPlugins folder: 

git clone https://github.com/idno/Twitter Twitter

git clone https://github.com/idno/Facebook Facebook

git clone https://github.com/mapkyca/KnownLinkedin Linkedin

git clone --recursive https://github.com/mapkyca/IdnoOpenGraph IdnoOpenGraph

git clone https://github.com/mapkyca/IdnoEmbeddedPosts EmbeddedPosts

git clone https://github.com/mapkyca/KnownLightbox Lightbox

git clone https://github.com/mapkyca/KnownEmoji Emoji

git clone https://github.com/idno/Presentation Presentation

git clone https://github.com/idno/Subscriptions Subscriptions

git clone https://github.com/mapkyca/KnownAkismet Akismet

git clone https://github.com/mapkyca/KnownGithub Github

git clone https://github.com/mapkyca/KnownChrome Chrome

git clone https://github.com/mapkyca/KnownIRC IRC

git clone https://github.com/mapkyca/KnownSitemap Sitemap

git clone https://github.com/kylewm/KnownReactions Reactions

git clone https://github.com/kylewm/KnownInstagramShim InstagramShim

git clone https://github.com/timmmmyboy/WordPress WordPress

- to update the plugins

simply "git pull" into each plugin folder, if you're already up to date the command will let you know. 

for the plugins with a different folder structure make sure to cp -avr the plugin folder inside the git folder back to your IdnoPlugins folder. 

 

Tip : 

I don't recommend installing & enabling all these plugins if you have no use for it

favor incremental changes while you progress with your website so that you can always go back if you need so.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.