Annual archive

2026

2 posts
  1. 2026

    One style guide for everything Claude Code writes

    I wanted everything Claude Code writes for developers to follow the Google developer documentation style guide. A forked skill, a few adaptations, and a local snapshot of all 70 guide pages got me there.

  2. 2026

    One command per issue: git worktree, tmux and Claude Code

    I kept running the same four commands to start work on an issue, so I wrote a script that does it. claude-work gives every issue its own git worktree, branch and tmux session running Claude Code.

Annual archive

2024

3 posts
  1. 2024

    Farewell to the WordPress Community

    So Long, and Thanks for All the Fish

  2. 2024

    Migrating from WordPress to Hugo

    Yesterday, I migrated this blog from WordPress to Hugo. These are the steps I took to do so.

  3. 2024

    Goodbye WordPress, Hello Hugo

    This afternoon's hobby project was to convert my WordPress blog into a static site using Hugo.

Annual archive

2019

1 post
  1. 2019

    Memento mori

    One day you will be gone. What defines your legacy, is not the gadgets you had, but what impact you left behind.

Annual archive

2018

12 posts
  1. 2018

    Install and update translations in WordPress with Composer

    Using Composer is a great way of organizing your WordPress project, with WordPress itself, plugins and themes declared as dependencies. However, an issue I’ve often seen is how you install translation files and keep them updated.

  2. 2018

    Wildcard certificate from Let’s Encrypt with CloudFlare DNS

    If you’re using CloudFlare to host your DNS, there is a plugin for the official Let’s Encrypt client Certbot you can use to easily acquire and renew wildcard certificates from Let’s Encrypt.

  3. 2018

    Debug and profile your WordPress sites with Xdebug in Local by Flywheel (using PhpStorm)

    This article is not an introduction to neither Xdebug, Local by Flywheel nor PhpStorm, but shows you how you can get started with debugging and profiling your WordPress sites in PhpStorm when using Local by Flywheel as a local development environment. You should already know what Xdebug is before reading this article. This is how you get started with Xdebug in Local by Flywheel.{{ double-space-with-newline }}

  4. 2018

    Gravity Forms personal data exporter and eraser

    When WordPress 4.9.6 launched on May 17, 2018 it came with new tools for exporting and erasing personal data that you may have collected (you know, GDPR and all). But Gravity Forms as of version 2.3.2 doesn’t integrate with these tools. Fortunately, it is really easy to write your own exporters and erasers.

  5. 2018

    How to mitigate CVE-2018-6389 – the load-scripts.php DoS “attack” in WordPress

    A little sensationalist written blog post by Barak Tawily claims that WordPress is vulnerable to a DoS attack because of the load-scripts.php file which concatenates JavaScript files on the fly.

  6. 2018

    HTTP/2 Push WordPress Assets to First-Time Visitors

    With HTTP/2 push you can effectively send a web page’s assets to the client before the client even knows about them. Here’s how you can HTTP/2 push WordPress assets to your first-time visitors.{{ double-space-with-newline }}

  7. 2018

    Another day, another “WordPress security vulnerability”

    OMFG, BREAKING NEWS: Thousands of WordPress sites affected by some vulnerability.{{ double-space-with-newline }}

  8. 2018

    Welcome to WordCamp Oslo 2018

    On March 2–4 2018, Friday through Sunday, there will be a great chance to meet WordPressers at the conference WordCamp Oslo 2018.

  9. 2018

    Cut 90% of your WordPress translations loading time

    WordPress translations are compiled from human-readable PO-files into machine optimized MO-files, but still takes a lot of overhead to load. If you only could cache the translation load time, you would save a lot of page load time. We can easily cut 90% of our WordPress translations loading time.

  10. 2018

    Git Pre-commit Hook for WordPress projects

    Wouldn’t it be cool if you, in your PHP project could define a package that makes sure that everybody who even tries to commit code is forced to follow the project’s defined coding standards? Yeah, me too. So I created this Composer plugin you can use in your projects.

  11. 2018

    Speed up the output by 1000x with a WordPress menu cache

    Generating the menus in WordPress is quite resource intensive. Sites with few visitors and few menu items might not notice this much. But if you have a large amount of menu items, like in a mega menu, in combination with a lot of visitors the menu generation can be a real hog on your server’s CPUs. Let’s see if we can improve the speed with a little WordPress menu cache trickery.

  12. 2018

    Automate the upgrade of your DigitalOcean droplets

    Recently DigitalOcean released [new pricing plans](https://blog.digitalocean.com/new-droplet-plans/) where they basically doubled the RAM for the same price of the old plans. But to get the benefits for your existing droplets, you have to upgrade all of your existing droplets in a process that involves shutting them down, selecting the new plan, waiting for the upgrade to happen and power on the droplets again. I have tens of droplets and had no intention of doing this manually, so I wrote a script to use the DigitalOcean API to automate a mass-upgrade of all droplets.

Annual archive

2017

22 posts
  1. 2017

    Customize the WordPress maintenance mode page

    Whenever you upgrade a plugin, theme or WordPress itself through the WordPress dashboard, WordPress will put itself in maintenance mode and all your visitors will see the maintenance mode notice “Briefly unavailable for scheduled maintenance. Check back in a minute.”

  2. 2017

    WordPress security for the casual blogger or small business with limited resources

    The resources you have available to spend on WordPress security for your website usually vary vastly whether you’re an international corporation or just a hobbyist blogger. But since most attacks are automated by bots looking for vulnerabilities, a lot of the threats are the same. Here are some WordPress security measures that bloggers and small business with limited resources easily can take.

  3. 2017

    Use mu-plugins for adding custom functionality to your WordPress site

    If you google “functions.php” you get about 7 million results. I bet most of them contain bad advice: “How to add functionality to your WordPress site”. Some of them continue even worse: “\[…\] without using a plugin”. For your own good, don’t edit functions.php to add custom functionality to your WordPress site. You can use mu-plugins to do that.

  4. 2017

    Don’t be “clever” with the translatable strings in your WordPress plugin or theme

    Since I translate a lot of WordPress themes and plugins, I sometimes come across plugins who try to be clever with their translations. This tends to not work so well in reality.

  5. 2017

    Do people struggle with Yoda conditions for real?

    I’ve been using, and advocating for others to use, Yoda conditions for a long time. Sometimes, I read or hear about someone who doesn’t like them, without actually describing why. From time to time I read a blog post that advocates against it: And it’s always the same reason.

  6. 2017

    A reference of all outgoing WordPress emails

    As you may know, WordPress sends out email notifications from time to time. Actually, as of WordPress 4.8.1, there are 24 different occasions when WordPress will send an email message. Don’t you think it would be useful to have a reference of all outgoing WordPress emails?

  7. 2017

    The bus factor in the WordPress project

    During WordCamp Europe 2017 in Paris, there was a Q&A session with Matt Mullenweg. I wanted to ask him a question, but due to high demand and restricted time, I never got to ask him. I guess Matt is a busy person, so I don’t expect him to actually answer this question himself. But maybe someone in the WordPress community has answers, insights or ideas? A person is the CEO of one of the most important WordPress-related companies.

  8. 2017

    Proper RFC 4122 UUIDs as GUIDs in WordPress

    UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier), is a string that identifies a piece of information in computer systems. WordPress use GUIDs to identify each individual post, but use URLs (kind of) for GUIDs, and thus does not follow the standard definition (RFC 4122) of a UUID (or GUID).

  9. 2017

    Secure email: Encrypt and sign your emails with PGP/GnuPG

    Email is fundamentally insecure. There are such a plethora of issues with it, it is crazy to think about the kind of information sent with it. It is probably even crazier when you realize we’ve had a solution for sending secure email since 1991.

  10. 2017

    Six reasons why I love WordCamps

    This weekend I was at WordCamp Berlin, met a lot of great people, and watched a lot of interesting presentations. WordCamps are actually quite informal by themselves, but at the afterparties, people are really letting their shoulders down and it often seems like people are long-time personal friends. If you open up to it, it won’t take long until people will give you feedback on whatever you have released in public.

  11. 2017

    DNS privacy: Use a DNS provider that doesn’t track you

    Many ISPs and other DNS providers are slow or inject ads, track you, hijack DNS queries or do other nasty stuff. To mitigate this, you should use a fast, reliable and free service that respects your DNS privacy.

  12. 2017

    Self-destructing cookies: Real, forced Do-Not-Track for your privacy

    This is the second post in my series of posts on some of the tools I use to stay a little safer and protect my privacy online. With self-destructing cookies, you get a clean sheet even with those who don’t respect the Do-Not-Track header.

  13. 2017

    How to perform and mitigate a WordPress session donation attack

    WordPress doesn’t use a nonce for the login form, which opens up for you to perform a WordPress session donation attack.

  14. 2017

    Immutable assets with unique URLs in WordPress for enqueued JS and CSS files

    If you’re utilizing the browser cache correctly, you’ll gain huge performance benefits for your users, as well as save bandwidth and server capacity which equals to saving money. To do this right, you must create unique URLs for all versions of your resources, and tell them to never ask for the content again by telling the browsers that the assets are immutable resources.

  15. 2017

    Secure messaging on your phone with the Signal app

    I’m running a series of posts on some of the tools I use to stay a little safer and protect my privacy online. Here’s how you can get much better secure messaging on your phone using the Signal app.

  16. 2017

    How CloudFlare handled CloudBleed

    Tavis Ormandy from Google’s Project Zero contacted Cloudflare to report a security problem with their service. It turned out that in some unusual circumstances, they would bleed memory that contained private information.

  17. 2017

    Giving users a helping hand when authorizing them in WordPress

    Inspired by how Facebook assists their users when they log in, I decided to implement something like the same for WordPress.

  18. 2017

    Tracking visitors with adblockers

    More and more users are using adblockers or surfing the web via private browsing with tracking protection. But this also affects your web analytics, as the blockers also will block analytics tracking – not only third party services like Google Analytics, but also self-hosted solutions like Piwik.

  19. 2017

    Move your WordPress site from non-www to www domain

    So, you’ve launched your WordPress site on a non-www domain, like example.com, but since then found out that running it on on www, like www.example.com, is better and want to move? You’re in luck, because it is really easy.

  20. 2017

    To www or not to www – Should you use www or not in your domain?

    For 20 years or so, there has been the debate over whether you should use www or not in your web site’s canonical hostname. So should you use www or not?

  21. 2017

    Keep the internet healthy – Internet for people, not profit.

    “ [A healthy Internet needs all of us](https://www.mozilla.org/en-US/internet-health/)”, Mozilla states. And they’re right.

  22. 2017

    Encrypt and decrypt a file using SSH keys

    If you have someone’s public SSH key, you can use OpenSSL to safely encrypt a file and send it to them over an insecure connection (i.e. the internet). They can then use their private key to decrypt the file you sent.

Annual archive

2016

8 posts
  1. 2016

    Flexible Content Fields in Field Manager

    [Field Manager](http://fieldmanager.org/) doesn’t have a flexible content field type as [Advanced Custom Fields Pro](https://www.advancedcustomfields.com/pro/) does, but it is possible to mimic the functionality by using a little logic.

  2. 2016

    Do you want my time for free?

    Publishing open source software or articles for free is very giving. Not only does it give you a warm fuzzy feeling inside when someone appreciates what you release, but it can also have [other indirect consequences](https://www.ostraining.com/blog/wordpress/giving-back/) that give you a happier life. But when something is free – as in no cost – people will also often turn to a mindset where they don’t appreciate your effort, time or value as a human being. For some reason, some people forget all about being polite and demands that I give them professional support because they can’t read instructions, don’t know what they are doing, or just feel like their time is much more important than mine.

  3. 2016

    Moderate WordPress comments with WP-CLI

    I very much appreciate comments that bring new insights, corrects my errors, or leaves a thank you note. But even so, it is a bit tedious to moderate comments. Though logging into WordPress – even with [two-factor authentication](https://www.bjornjohansen.com/two-factor-authentication-for-wordpress) enabled – isn’t much of a hassle, it is still a nuisance when you just want to approve or trash a couple of comments.

  4. 2016

    How to do an Nginx redirect

    Nginx is an extremely efficient and quite flexible web server. When you want to do a redirect in Nginx, you have a few options to select from, so you can choose the one that suits you best to do an Nginx redirect.

  5. 2016

    The future of Certificate Authorities

    With the advent of the fully automated and free of cost certificate authorities Let’s Encrypt and StartCom there is no doubt that the future of CAs are changing.

  6. 2016

    SVG uploads in WordPress (the Inconvenient Truth)

    Enabling uploads of SVG files in WordPress is quite easy, and there is a tonne of posts on the Interwebs explaining how you do it. Usually along the lines of: ``` function add_svg_to_upload_mimes( $upload_mimes ) { $upload_mimes['svg'] = 'image/svg+xml'; $upload_mimes['svgz'] = 'image/svg+xml'; return $upload_mimes; } add_filter( 'upload_mimes', 'add_svg_to_upload_mimes', 10, 1 ); ``` And that’s pretty much it. Except it is not.

  7. 2016

    Allow SVG uploads to WordPress when behind Sucuri CloudProxy

    Uploading SVG files to WordPress when you’re behind the Sucuri CloudProxy Web Application Firewall isn’t that straightforward, but it is possible.

  8. 2016

    Let’s Encrypt for Nginx

    Let’s install an SSL-certificate from Let’s Encrypt for Nginx.

Annual archive

2015

16 posts
  1. 2015

    Run all due cron events for WordPress with WP-CLI

    Running a real cronjob is much more reliable than WordPress’ built-in “maybe-will-trigger” solution. But if you’re running a multisite network, you have to add a crontab entry for every site you set up – which is tedious. Thanks to WP-CLI, we can use a small bash script instead, which will run all due events for all sites for us. Oh, and it works for single sites as well.

  2. 2015

    How to upgrade to PHP 7 on Ubuntu

    Depending on your time zone, PHP 7 was finally released on 3rd/4th of December 2015. Even though the general recommendation for production servers is to wait for a little bit and gather some experiences before upgrading, some of us want to jump right on and upgrade to PHP 7.

  3. 2015

    Restrict allowed HTTP methods in Nginx

    Security vulnerabilities are often exploits of software that fails when trying to deal with unexpected input. Other times they are exploits of a misconfiguration or a service that unintentionally was open to the public. For the above reasons, we should limit as much as possible what services are exposed to the public and limit as much as possible what they do and accept from the visitors. To follow those security principles, we should only allow the HTTP methods for which we, in fact, provide services. Under all normal circumstances, that would be the methods `GET`, `POST` and `HEAD`.

  4. 2015

    Block access to PHP files on your WordPress site with Nginx

    In your WordPress site, there are directories that include PHP files that visitors should never be able to access directly. They are only there for WordPress to function as an application that runs on your server. But because of WordPress’ directory and file structure, they are kind of accessible to the public. All of them are meant to be part of a larger application – WordPress, that is – and should not cause any harm if called directly – that we know. Some of the files execute some code even when ran standalone. An attacker might know of a clever way to make that code run in an unexpected manner, causing harm. To be on the safe side, we should deny access to all these PHP files from the outside world. Since we block access to them in our Nginx configuration, PHP will still run them as usual and WordPress will work just fine.

  5. 2015

    Restrict access to the WordPress dashboard by IP address in Nginx

    If you have a static IP address, like from your office, or [your own private VPN](https://www.bjornjohansen.com/setting-up-your-own-pptp-vpn), you can increase your security tremendously by restricting all logins to that IP address. The effect is that even if an attacker knows your login credentials, they will not be able to log in or access any part of the WordPress Dashboard.

  6. 2015

    Redirect all HTTP requests to HTTPS with Nginx

    All login credentials transferred over plain HTTP can easily be sniffed by an MITM attacker, but is is not enough to encrypt the login forms. If you are visiting plain HTTP pages while logged in, your session can be hijacked, and not even [two-factor authentication](https://www.bjornjohansen.com/two-factor-authentication-for-wordpress) will protect you. To protect all info sent between your visitors – which includes you – and your web server, we will redirect all requests that are coming over plain HTTP to the HTTPS equivalent.

  7. 2015

    Strict file ownership for your WordPress installation

    WordPress requires write access to one directory, and that one directory only: the directory returned by `wp_upload_dir()`. By default, this is `/wp-content/upload`, but it can be configured to anything that is beneath your document root, like `/media`, if you want to.

  8. 2015

    Exclude certain requests from the Nginx access log

    Logs are nice and all that, but sometimes certain entries are there just to fill up the logs or are cluttering them. Here’s a few ways to exclude requests – by URL or visitor IP – from the Nginx access log.

  9. 2015

    Configure your local Postfix to relay through a transactional email service

    Using Postfix with specialized, transactional email services like SendGrid or Mandrill is excellent for not only for optimizing email deliverability, but they usually also offer some nice features.

  10. 2015

    Two Factor Authentication for WordPress

    If you’re using a strong password, brute-forcing is a very inefficient way of breaking into your WordPress account, and if it is really strong, dictionary attacks won’t help much either. However, there are are other, easier, ways for a mischievous person to get their hands on your login credentials e.g. with phishing, keyloggers or a MITM attack. By using a two-factor solution, you will increase your login security by an order of magnitude.

  11. 2015

    SSH timeout prevention – keep SSH sessions alive

    SSH timeout due to inactivity is annoying. Here’s how to keep your SSH sessions alive and prevent the SSH timeout:

  12. 2015

    WordPress behind Big-IP

    To be honest, I don’t exactly know too much about Big-IP, but I’ve come across someone who use it. They terminate HTTPS in Big-IP and WordPress runs on plain HTTP on port 80 on the backend nodes. By default, this makes WordPress confused, so you can’t login to the WordPress dashboard.

  13. 2015

    Enable HTTP/2 on Nginx

    Experimental support for HTTP/2 became available in Nginx version 1.9.5 (mainline). It is really easy to enable, and I’ll show you how.

  14. 2015

    HTTP Public Key Pinning (HPKP)

    [Using HTTPS](https://www.bjornjohansen.com/securing-nginx-ssl) helps preventing someone from snooping your username/password or hijacking your sessions. [Using HSTS](https://www.bjornjohansen.com/optimizing-https-nginx) makes sure the connection stays on HTTPS, even if a MITM tries to redirect you to the plain HTTP version of a web site. But it is easier than you might think for a MITM to use a rogue certificate, making you believe everything is fine. HTTP Public Key Pinning (HPKP) helps the browser check that everything actually is fine.

  15. 2015

    The slides from my presentation on HTTP/2 at WordCamp Belgrade 2015

    Here are my slides from WordCamp Belgrade 2015: [HTTP/2 is here – Unlearn your optimization skills](https://www.bjornjohansen.com/wcbg15-slides/) If you’re having issues with the HTML version, you may [download a PDF here](https://www.bjornjohansen.com/content/uploads/2015/04/HTTP2.pdf).

  16. 2015

    Running PHP7-FPM Nightly Build on Ubuntu 14.04

    As I’m writing this, the calendar shows April 14 2015. According to the [PHP 7.0 timeline](https://wiki.php.net/rfc/php7timeline), it has a projected release date of November 2015. But if you want to try it out (to check out the speed), you can already do so.

Annual archive

2014

7 posts
  1. 2014

    Running HHVM with fallback to PHP-FPM

    HHVM can really speed up your PHP-based web site. Most reports are somewhere in the range of 2–4x faster. Unfortunately, HHVM isn’t very stable and will suddenly die, just of the blue, from time to another. Fortunately, if you’re running Nginx it’s really easy to set up PHP-FPM as a fallback.

  2. 2014

    Using fail2ban to block WordPress login attacks

    Fail2ban works by filtering a log file with a regular expression triggering a `ban` action if the condition is met. After a preset time, it will trigger an `unban` action. Without much effort, we can have WordPress log all authentication events and have fail2ban react on them.

  3. 2014

    Using fail2ban from behind a Rackspace Cloud LoadBalancer

    If your fail2ban is on a host behind a Rackspace Cloud LoadBalancer, you’ll want to block the offending IP addresses directly in your LoadBalancer. If your LB is acting as a reverse proxy, you’ll HAVE to block in the LB, but it is also nice to protect all other nodes behind the LB and offload the lifting.

  4. 2014

    Running HHVM instead of PHP with Nginx on Ubuntu

    Since version 3.9, WordPress have been 100% compatible with [HHVM](http://hhvm.com/ "HipHop Virtual Machine") and I have begun replacing PHP with it on a few of my servers to experiment.

  5. 2014

    WordPress Quality Guidelines

    Any organization where multiple developers cooperate on a regular basis needs some guidelines to assure optimal quality of the end result. Most of these rules applies to freelancers as well.

  6. 2014

    «Slap-on» speed optimization of your WordPress site

    OK, so you might have been at a WordCamp listening to talks or reading a few blog posts and you get that you should really get your WordPress site speed optimized. Starting all over isn't either tempting nor something you have the time for. Don't despair, you'll get a long way by installing 5 plugins.

  7. 2014

    Optimizing HTTPS on Nginx

    Now that you have secured [Nginx with HTTPS](https://www.bjornjohansen.com/securing-nginx-ssl) and [enabled SPDY](https://www.bjornjohansen.com/enabling-spdy-nginx) [enabled HTTP/2](https://www.bjornjohansen.com/enable-http2-on-nginx), it's time to improve both the security and the performance of the server.

Annual archive

2013

14 posts
  1. 2013

    Host ga.js locally with a WordPress plugin

    Recently, I've done some WordPress load optimization with Thomas Bensmann (read his post « [Full score on Google PageSpeed, Pingdom and GTMetrix](https://bensmann.no/full-score-google-pagespeed-pingdom-gtmetrix/)») and to achieve full effect, you do have to load the Google Analytics tracking script, ga.js, from your own server.

  2. 2013

    Optimize your JS and CSS loading in WordPress

    When you get into page loading optimization, you will quickly find these «must-dos»: Combine your CSS and JavaScript files (respectively), minimize your CSS and JavaScript, load CSS before JS, load JS in body footer and then even some. Without much effort, we can make WordPress do all of this automatically.

  3. 2013

    Make Gravity Forms' JavaScript load in the footer

    Gravity Forms is not only THE way to create and manage forms in WordPress, but is also pretty awesome when it comes to extensibility and flexibility. However, as most software, it has its issues. One of those is how it outputs some of the JavaScript, which in certain cases will break your site. This is how to fix it.

  4. 2013

    Why use WordPress as your corporate CMS?

    ![WordPress](https://www.bjornjohansen.com/content/uploads/2013/08/wordpress-300x186.png)There are now several years since WordPress was considered a blog platform only. Today, it's a full blown CMS and perfectly capable of powering corporate web sites. Here I provide you with 5 non-technical reasons why WordPress is well fit for a corporate CMS.

  5. 2013

    Enabling SPDY with Nginx

    SPDY is this new, cool, fast protocol created by Google that "replaces" HTTP (the first draft of HTTP 2.0 is using SPDY as the working base). It is [supported in all the major browsers](http://caniuse.com/spdy "Compatibility table for support of SPDY networking protocol in desktop and mobile browsers.") – yes, even Internet Explorer – with the exception of Apple's Safari.

  6. 2013

    Securing Nginx with HTTPS

    ![SSL](https://www.bjornjohansen.com/content/uploads/2013/08/origin_4146023669-150x150.jpg)Adding a certificate and using the HTTPS protocol is a good improvement to the security in the communication between the browser and the server, and should be in place on all sites that have a user login. Contrary to what many (older) guides say, it doesn't add much load on your server and is fairy easy and cheap to set up right.

  7. 2013

    Install latest version of Nginx on Ubuntu

    ![Nginx](https://www.bjornjohansen.com/content/uploads/2013/08/nginx-300x64.png)I always run the latest LTS version of Ubuntu on all my servers. Unfortunately, the Nginx versions tend to be quite the bit behind the current release. So how do you get an updated, current version of without resorting to having to maintain the packages yourself? Luckily, the Nginx team have their own Ubuntu apt repository so it’s easy to keep current with the latest version of Nginx.

  8. 2013

    Install latest version of PHP on Ubuntu

    ![PHP](https://www.bjornjohansen.com/content/uploads/2013/08/php-logo-300x157.png)I always run the latest LTS version of Ubuntu on all my servers. Currently the latest LTS is 14.04 which comes with PHP version 5.5, but as of November 2014, the latest stable version is 5.6. So how do you get an updated, current version of PHP without resorting to having to maintain the packages yourself? The answer is in PPA.

  9. 2013

    Publishing WordPress site from development to production server – or moving your WordPress installation from one host to another

    ![WordPress](https://www.bjornjohansen.com/content/uploads/2013/08/wordpress-300x186.png)You have finished that WordPress site, and want to deploy it – move it from your test server to the production server where it goes live. But how? WordPress have a famous 5-minute-install, but there is no 5-minute-go-live-script\*. I'll show you how in these 5 easy-to-follow steps.

  10. 2013

    Restricting access to WordPress login by IP address

    If you have a static IP address, like from [your own VPN](https://www.bjornjohansen.com/setting-up-your-own-pptp-vpn), it is very easy to increase your security tremendously. Simply restrict all logins to that IP address.

  11. 2013

    Setting up your own PPTP VPN

    When it comes to VPNs, there is the choice between PPTP and OpenVPN. PPTP is pretty quick to setup and works out of the box with most (all?) OSes and devices.

  12. 2013

    Get your Ubuntu VPS up and running

    ![Ubuntu](https://www.bjornjohansen.com/content/uploads/2013/04/ubuntu-300x148.png)These are the first steps you should perform on your shiny, brand new VPS to set out on a safe journey on the internets. You don't actually have to understand each of the steps here, but this post is intented for people who have some clue of what they're doing. If there is such a thing as a «VPSes for dummies», it should not be read. VPSes are not intended for dummies.

  13. 2013

    Caching: Varnish or Nginx?

    TL;DR: Varnish lacks support for SSL and SPDY. Nginx handles it just fine, and has very fast cache with either memcache or disk storage (ramdisk). Both can serve stale cache if your backend is down. But Nginx can not write to the memcache storage directly, it has to be done by the application. Also, Nginx can not purge the cache itself, without you compiling your own package.

  14. 2013

    Using Jekyll without YAML front matter

    OK, so I was ready to give Jekyll another shot today. But one thing I’m not that happy with is the need for specifying the YAML front matter on every post. At this point, I’m not really using it for any practical matter.