Category: Tutorial

  • How to Secure Your WordPress Blog

    How to Secure Your WordPress Blog

    How to Secure your WordPress Blog

    Background

    “Cybersecurity is not a job; it is personal responsibility.” If you are looking to secure your WordPress blog, you are in the right place.

    In this article, I will explain how to secure your WordPress blog. Since cybersecurity is not a one size fits all solution, I have to explain my situation which influences my countermeasures first.

    I access my blog solely from my trusted devices and I am the only user. My threat model is Low skilled attacks that relies on phishing, brute force and low hanging vulnerability. I refrain from using pro solutions. Thus, my article will involve a little tinkering.

    Countermeasures

    Strong Password

    This goes without saying. If your Password is easy to guess , you will be easily breached.

    There are few formulas to generate a strong password. Personally I am using the diceware method. It creates a strong and memorable password.

    Then, head to Users tab, find your username, and replace the password as you desired. Pay attention the the password strength indicator. Make sure it says “strong”.

    Enable Multi Factor Authentication

    As an additional layer, you can enable Multi Factor Authentication using plugins. Keep in mind that they won’t make yourself invincible, only harder.

    Using MFA also means you have to protect your phone. Additionally if you set up security questions, use the answer that are unique and confidential. Just as your password is.

    Limit Login Attempts

    Brute force is an attack that tries to guess password with thousands if not millions attempts. The best way to stop it is simply limit the login attempts.

    To limit login attempts, go to Plugins > search Limit Login > choose anything that fits your needs. For me WP Limit Login Attempt is enough.

    This does not protect you from more sophisticated password guessing, however. Also, be careful when typing your password or you’ll get locked yourself.

    Auto Update WordPress

    Keeping your system up to date is a simple way to keep yourself safe. A system can be compromised because it’s out dated, thus allowing attackers to exploit old vulnerabilities.

    To enable auto update, you can check Dashboard>Home>Update. Alternatively consult your hosting provider if they take care of it.

    Anti Spam Countermeasure

    Phishing is a simple yet effective attack vector. To stop phishing attack possibilities, I adjusted some settings in the comment section.

    • Users must fill username and email.
    • Comments only from registered and approved users.
    • Lock commenting on posts older than two weeks, so spammers can’t keep spamming my site.
    Comment Settings
    Comment Settings

    Better yet, use an anti-spam protection plugin such as Akismet. 

    Conclusion

    I have explained few simple steps to secure your wordpress blog. The countermeasures I deployed are based off my plan which changes over time.

    After this, I will do SEO audit for this blog. It will make my site even more popular, thus inviting more attackers, and changing my plan.

    So if you find my article relevant and would like to see how it changes, feel free to bookmark!

    References

    WordPress for Beginner – WP Beginner
    20 Steps to Secure Your WordPress Blog – HubSpot
    WordPress Documentation Official Page – WordPress.org

  • Shalat Measurement & Analysis

    Shalat Measurement & Analysis

    Background

    Muslims are required to pray five times a day in the prescribed time, they are : Shubuh, Dzuhur, Ashar, Maghrib, and Isya. As a muslim who is still learning the basics, I pray regularly but sometimes I miss one to few times. “How many times do I pray in a day?”, “Which shalat am I frequently missed?”, or “Where do I usually pray?”, these are the questions I frequently asked. Unfortunately I didn’t have the answer.

    Method

    I have came up with several way to measure shalat using what’s called as mental models. There are atleast 4 models if i recall correctly, starting from at some point in 2021. Back then, I didn’t do it regularly.

    Recently I came up with a way to measure shalat. Each shalat is categorized into three parameters, Commitment (Committed/Abandoned), Place(Home/Mosque), and Person(Jamaah/Alone). Then, I count each category to get overview of my shalat so I can answer my question. You can find the full instruction on Github.

    Think of the instruction as if you are talking to yourself.

    “Assalamualaikum, did you commit shalat dzuhur?” -> Commitment
    Waalaikumussalam, yes, I did. -> Committed
    “Alhamdullilah, where did you pray?” -> Place
    Today is raining so I pray at home. -> Home
    “Did anyone else pray with you?” -> Person
    I pray alone -> Alone

    Then you could write it down on paper as the following :
    Dzuhur : Committed, Home, Alone
    And you do the same thing with the rest of shalat.

    This is not the only method I use to measure shalat. I’ve had this idea as early as 2021, but at the time I only wrote the rules on paper and no surviving documents. Back then, I didn’t do I regularly either. Thus, I will demonstrate shalat measurement using the current method only.

    Implementation

    I wrote my shalat records on my journal. This means I need to transcribe them to the computer in order to calculate them. My goal is to analyze all of my shalat records in entire month. For the purpose of this article alone and to simplify things, I will analyze my shalat records from the five days of early december 2024 and five days of january 2025.

    After that, I calculated my shalat record using Google Sheets (Forgive me Mr.Stallman). You can use any spreadsheet programs that you like, be it LibreOffice, OpenOffice, or even physical spreadsheet if you hate technology (why are you reading this?). I thought using the commandline to calculate the data, but that’ll be another article.

    Open your spreadsheet program. Then, create three sheets with the following purposes :
    1. Data 1 : The data of earlier days, in this case December 2024.
    2. Data 2 : Data 1 : The data of later days, in this case January 2025.
    3. Dashboard : The sheet where you will be doing the calculation for both data.

    After that, open the Data 1 sheet or whatever you decided to name it and create the following attributes on top of the row :

    • Date : The date where you committed the shalat.
    • Shalat : The name of the shalat committed, shubuh, dzuhur, ashar, maghrib, isya.
    • Committment : Whether you committed or abandoned the shalat.
    • Person : Whether you commit the shalat alone or jamaah.
    • Place : Whether you commit the shalat at mosque (and mushalla) or at home.

    To make it better, you can use a drop-down menu from data validation. If you are using Google Sheets, follow this :
    Data > Data Validation > Edit rule

    After that, fill in the data. This is the real exercise; be honest with yourself and fill it as you did. The end result should look like this :

    Calculation

    Now we move on to the dashboard. The calculation will be a simple summary of each category.
    Formula : =COUNTIF(December_2024!$C:$C, $A$4)
    This formula will check the December 2024 data to find the data of A4 cell, Committed. Other attributes are calculated in the same way, so adjust the COUNTIF according to the data of each attribute’s range and attribute’s cell.

    After that, we will calculate the percentage. It’s useful to indicate whether we fully committed to the five daily prayer.
    Formula : =B4/($B$4+$B$9)
    The formula divides the value of the cell in the current attribute with total value of all shalat that we are supposedly committed, which is the addition of shalat committed and shalat abandoned. Don’t forget to format the cells with percentage, and adjust the decimals accordingly.

    Ideally, your shalat record should improve over the time. To make it easier to tell, I decided to make another column named ‘growth’. It’ll tell me if my records went up, went down, or stay the same. The logic goes like this :

    If score after > score before, then “positive”
    If score after < score before, then “negative”
    else, “none

    Muslim men are required to pray in the mosque, thus I highlight the cell in green to make it easier to find it.

    Here is my results.
    I need to improve my prayer bruh.

    If you feel too lazy to actually make it, I have provided the template here.

    Conclusion

    I have demonstrated the way to measure and analyze shalat. So far I have only shown the measurement method and overview of the analysis using spreadsheet. On the next articles, I will show how to analyze the spreadsheet with commandline utilities and possible way to improve the analysis.