= Install and Configure Dokuwiki = **Summary**: This wiki page shows how I installed and configured this site using dokuwiki. \\ **Date**: 2 December 2024 \\ {{tag>dokuwiki}} = Installation and Basic Configuration = The original installation was already done in 2012 using the "Adore Belle" edition. In 2021 I had to do the installation again because everything broke due to a failed installation. This is the installation as from then: * Download * [[https://download.dokuwiki.org/|Download DokuWiki]] * 2020-07-29 "Hogfather" * [[http://www.dokuwiki.org/Install|Install DokuWiki]] * Unpack the distribution tarball and upload/copy the files to the httpdocs folder * Open the install.php in your browser and follow the instructions * Wiki name: SHIFT * Initial ACL policy: Public, read for everyone, write and edit for registered users only * License: GNU Free Documentation License * Deleted the install.php * Configure webserver and dokuwiki * Use nice URLs through rewriting * Enable in Configuration Settings -> Advanced Settings -> Use Nice URLs: .htaccess * Modify htaccess.dist to htaccess and uncomment rewrite rules: ## Uncomment these rules if you want to have nice URLs using ## $conf['userewrite'] = 1 - not needed for rewrite mode 2 RewriteEngine on # RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] RewriteRule ^$ doku.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) doku.php?id=$1 [QSA,L] RewriteRule ^index.php$ doku.php * Adjusted license to GNU Free Documentation License = Side Bar = A side bar is not included by default, but just create a page called 'sidebar' and the sidebar will be shown on the right side of the page. The sidebar is included in the template and is shown on every page. * Create the page sidebar = Additional Configuration = I've configured the following settings: * Basic Settings * Tagline: --- Sjoerd Hooft's InFormation Technology --- * Display Setting * Use first heading for pagenames = Always * Authentication Settings * Disable DokuWiki Actions: Register * Editing Settings * Automatically save a draft while editing: no * Allow embedded HTML: yes * Link Settings * Target window for external links: _blank * Media Settings * JPG compression quality (0-100): 100 = Plugins = I've installed and configured the following plugins: * Creole plugin * http://www.dokuwiki.org/plugin:creole * Go to admin -> Configuration Settings -> Plugin Settings -> Creole Plugin -> Markup precedence and set this to Creole * Creole is used to support more common wiki syntax, like the headers and tables syntax I use * Tag plugin * http://www.dokuwiki.org/plugin:tag * Requires pagelist plugin: http://www.dokuwiki.org/plugin:pagelist * Formatting flags for the taglist: table,header,tags * Show toolbar icon: on * Choose style applied to pages' tags list: optimized for tags list on top of page * Used for the tags on top of the page * Pagelist plugin * https://www.dokuwiki.org/plugin:pagelist * show heading line: on * The Pagelist Plugin takes a list of wiki pages and provides a nicely formatted table with information about them. * Cloud plugin * http://www.dokuwiki.org/plugin:cloud * Used for the tag cloud on the side page * Changes plugin * https://www.dokuwiki.org/plugin:changes * Used for the recently changed pages in the sidebar * Blog and include plugin * https://www.dokuwiki.org/plugin:blog * Position of the new entry form: none * https://www.dokuwiki.org/plugin:include * Used for the three most recently added pages to the start page * Remove old files plugin * https://www.dokuwiki.org/plugin:removeold * Run this plugin to remove old files and clear up space * Searchindex manager * https://www.dokuwiki.org/plugin:searchindex * Used to rebuild the index search and tags * Upgrade plugin * https://www.dokuwiki.org/plugin:upgrade * Used to upgrade the wiki * copy2clipboard Plugin * https://www.dokuwiki.org/plugin:copy2clipboard * Enables a 'copy to clipboard' button for code blocks * htmlok plugin * https://www.dokuwiki.org/plugin:htmlok * Allows (again) for native HTML and php * Go to settings -> Plugins -> htmlok -> Allow embedded HTML * Wrap plugin * https://www.dokuwiki.org/plugin:wrap * Used for the boxes on the page * Imagebox plugin * https://www.dokuwiki.org/plugin:imagebox * Used to add a border around images, also supports caption markup * Adwords * https://www.dokuwiki.org/plugin:gautoads * From google adsense, list your site, get it approved and from the Ads section get the code to add it to the plugin settings * Then edit your site listing in adsense and check the settings and then apply for the ads to be shown * Redirect pages * https://www.dokuwiki.org/plugin:pageredirect * To redirect old pages to new pages or the homepage. Find all pages in the repo that do this by searching for {{{~~REDIRECT>}}}. The plugin gives a 301 http status code, which will not impact your ranking in any SEO. = Change the Logo and FavIcon = Dokuwiki checks a few places for the favicon and logo, and one of them is the root of the wiki namespace: * Open the media manager * Select the wiki namespace * Select the logo.png, apple-touch-icon.png and favicon.ico and upload the files * Add the favicon.ico also to the root of the httpdocs folder = Template Changes = Create the following file {{{conf/tpl/dokuwiki/style.ini}}} to be able to make changes to the template. Add the following lines to change the width of the site and the sidebar: [replacements] __site_width__ = "95%" __sidebar_width__ = "25%" = Upgrade Dokuwiki = == Create a backup == Create a backup by downloading the following folders: * data/pages - contains your current pages * data/attic - all the old versions of your pages * data/meta - contains meta information about your pages (like who created it originally, who subscribed to it, …) * data/media - contains your current media (images, PDFs, …) * data/media_attic - all the old versions of your media * data/media_meta - meta data for the media * conf - the configuration settings * lib - will backup the installed plugins and templates (many optional, otherwise they will need to be manually downloaded again in a possibly broken interface) However, take care not to overwrite the default included core plugins == Upgrade == Upgrading dokuwiki is best done using the Upgrade plugin. Go to the admin section and click 'Wiki Upgrade'. This will start the upgrade, by just following the steps. == Upgrade Plugins == Go to the admin section and click 'Extension Manager'. This will show you the plugins that need to be updated. Click 'Update' to update the plugins. = Useful Links = * [[https://www.dokuwiki.org/wiki:syntax|Syntax]] * [[https://www.dokuwiki.org/plugin:creole|Creole Syntax]] * [[https://www.dokuwiki.org/plugin:wrap|Wrap Syntax]]