• Skip to main content
  • Skip to primary sidebar

Trisha Cornelius

Figuring it out as I go

  • Mental Health
  • Motherhood
  • Development
  • Design
    • Design Portfolio
  • Miscellany
  • Reading
    • Biography
  • About Me
    • Bucket List
    • About Me – old
      • Newer old about me :)
    • Privacy policy

WordPress

Step Zero and a Half (Take 2)

Yes, I know it’s been a week. I have been very busy 🙂

We are trying to get Vagrant up and running. Last change was enabling the Linux services on Windows. (We being me, with Riaan at my side for tech support 🙂 )

It turns out that was the trick.

This time round, I just needed to run the commands. I got the error that the directory already existed and is not an empty directory, but did an easy fix of going in and deleting the folder. To find the path the command was pwd.

So, on to the next steps.

False alarm, I forgot that we had reached this point last week. So I spent a bit of time searching the Sitepoint forums and I am definitely not the only person who has experienced this error.

Riaan suggested actually installing the WSL. So that’s what’s going on at the moment. The instructions to install WSL are found here.

Ubuntu installed on Windows. Now the next step is to run the vagrant setup through this. Fingers crossed.

So trying to run the install command per the instructions didn’t quite work. The error message was unable to locate package virtualbox, and then the same for virtualbox-dkms and vagrant. Riaan told me to run sudo apt-get update. That’s now running. There is definitely some wait time involved. And while I know that this isn’t actually compiling, it made me think of this XKCD comic:

Installing a new environment also seems to be a legitimate excuse.

This process has been time consuming and despite me having over 30 gigs of free space, the install ran out of space due to Windows grabbing most of that free space to allow for installations to take place. So when the installation failed I needed to run yet another command, and another, and another.

As we sat down to supper, Riaan suggested that I actually follow Vagrant’s instructions instead of those in the book. So that’s what I plan on doing tomorrow.

So to be continued…again 🙂

25 Dec 2021 by Trisha Cornelius

Filed Under: WordPress Tagged With: autobiographical, learning, PHP and MySQL Novice to Ninja, WordPress

Getting back into some development

Hello world,

It’s been a while. The good news is the family and I are all as healthy as can be expected in the middle of a global pandemic. It also means that things have not entirely gone according to plan (If they had I would be in second year of a Bachelor of Education degree). But, its perfectly okay to press pause when necessary.

So I am currently not enrolled for an education degree, but I will again. I am aiming to go back to studying in 2023 and although the shortest duration is 4 years I have set a schedule that will probably have me complete the degree in 7 years.

And I have the teeniest bit of time on my hands. I decided that I want to build a library web app with WordPress for my tutor centre. A few years ago I picked up a copy of Building Web Apps with WordPress by Brian Messenlehner and Jason Coleman after hearing Jason speak at WordCamp Cape Town in 2017 with the idea of learning a bit more. (In 2017 I was very much more focused on the website design and development journey).

I am very close to an absolute beginner when it comes to PHP. So when I read the introduction I saw that I need to take a few steps back and dive back into learning PHP. With that in mind, I have logged into my neglected SitePoint premium membership and have chosen to work using PHP & MySQL: Novice to Ninja.

I have also decided to blog this journey – because, I like seeing others learn.

So, here’s to a coding adventure.

Love and coding,
Trisha

17 Dec 2021 by Trisha Cornelius

Filed Under: Development Tagged With: autobiographical, learning, PHP, WordPress

Constantly Evolving

“Once we were blobs in the sea, and then fishes, and then lizards and rats and then monkeys, and hundreds of things in between. This hand was once a fin, this hand once had claws! In my human mouth
I have the pointy teeth of a wolf and the chisel teeth of a rabbit and the grinding teeth of a cow! Our blood is as salty as the sea we used to live in! When we’re frightened, the hair on our skin stands up, just like it did when we had fur. We are history! Everything we’ve ever been on the way to becoming us, we still are. […]
I’m made up of the memories of my parents and my grandparents, all my ancestors. They’re in the way I look, in the colour of my hair. And I’m made up of everyone I’ve ever met who’s changed the way I think.”

Terry Pratchett – A Hat Full of Sky

Hello blog,

It’s been a while. Much has changed in the past year. Firstly, there was Riaan’s diagnosis with Juvenile Onset Parkinsons Disease. Then, I helped out with tutoring some English.

When that happened I relearned something. I am an utter and total English nerd. I love being able to deploy words like hyperbolic and hydraphobic in conversation when the opportunity arises.

And so, I made a decision. I am no longer aspiring to be a WordPress professional. I will continue to love WordPress. I know that I will stay involved in the local community. I am still keeping going to WordCamp Europe and WordCamp US on my bucket list. (And to get WordCamp Africa or Southern Africa to happen.)

Now, I will continue to play with code and I am pivoting to teach English professionally.

Love and Evolution,
Trisha

4 Oct 2019 by Trisha Cornelius

Filed Under: Miscellany Tagged With: personal, WordPress

A very basic guide to hooks, actions and filters for WordPress

I originally wrote this post in August 2015 and published it on Red Dragon Creative’s site. Subsequently, Riaan and I have made the decision to close Red Dragon Creative and for me to focus on WordPress development under my own name. I still believe that the information in this post is valuable, and so I have chosen to republish it here.

Part of WordPress’s power is the fact that it is so extensible. The tools in the WordPress toolbox to achieve this are hooks, actions and filters. But some of the documentation can be very intimidating, so in less than 200 words I will provide you with a basic guide to hooks, actions and filters.

Hooks simply refer to where your custom code will be executed.

There are two types of hooks: action hooks and filter hooks.
Action hooks do something in your code. (You can either add or remove actions using the very handy and intuitive code: add_action or remove_action)

Filter hooks modify something in the code, so instead of doing something entirely new or different…it simply changes your code. The very intuitive code to add a filter is: add_filter.

That’s it, a very basic guide to hooks, actions and filters for WordPress.

Read more:

  • Tuts Plus: The Beginner’s Guide to WordPress Actions and Filters
  • WordPress Actions, Filters, and Hooks: A guide for non-developers
  • WordPress’s Hooks Reference
  • WordPress’s Action Reference
  • WordPress’s Filter Reference

28 Sep 2018 by Trisha Cornelius

Filed Under: Development, WordPress Tagged With: WordPress, wordpress actions, WordPress filters

Being a woman in tech

Hello blog,

This is a difficult blog to write and I am not sure where to categorize it. I will probably file it under development, which is where it belongs but it touches on a lot of things.

I am the daughter of a developer and women in tech were a part of my life, where my father spoke of his female colleagues in the same way as he spoke of his male colleagues and work social gatherings included both men and women.  So for me, women in tech were not unicorns, and as they were spoken of as being equally competent as men. The first time that I encountered hostility in tech was in a forum and in all honestly it shocked me to the core. Also, being me, it pissed me off, but I dismissed it as being an isolated incident and not a reflection of the general tech community.

For the most part I kept on with tech in the background and I did not pay attention to what was going on in the tech community. In 2015 I went to my first tech meetup hosted by WordPress Joburg. I felt safe and welcome, especially when I made a comment that my ability to attend a meetup on weeknight would depend on getting a baby-sitter for my son and was met with the response of “Bring him with”. I have been an active member of the WordPress Joburg Community ever since and now am one of the co-organizers.

<sidenote> Of course being a woman comes with a level of being aware of background misogyny, both the unintentional systematic misogyny that permeates the world and the deliberate and malicious misogyny that forms part of the day-to-day world. In this regard I have a few advantages, being a white woman from a middle class family who studied law and was warned by my principal in the first few days of my articles about the inherent misogyny of the legal profession and given some tips to ignore it, combined with a low-level of neuroatypicality meant that I generally was able to ignore the effects of misogyny until my thirties.</sidenote>

My first in-person encounter with misogyny in the tech world happened in 2016, where I was made to feel like a completely unreasonable, trouble-making bitch for daring to be anything other than a sycophant when I spoke up at a meetup. In a not atypical reaction I did ask a fellow attendee privately whether I was being oversensitive or whether there was genuine hostility, they too had perceived hostility.

It is against this background that I read the New York Times’s 2014 article “Technology’s Man Problem”. I have some specific thoughts and comments:

Women who enter fields dominated by men often feel this way. They love the work and want to fit in. But then something happens — a slight or a major offense — and they suddenly feel like outsiders.

I never felt explicitly unwelcome in the tech community until the incident I described above, and that incident along with a collection of other comments and interaction made me consider walking away from the tech community 🙁

A culprit, many people in the field say, is a sexist, alpha-male culture that can make women and other people who don’t fit the mold feel unwelcome, demeaned or even endangered.

“It’s a thousand tiny paper cuts,” is how Ashe Dryden, a programmer who now consults on increasing diversity in technology, described working in tech.

A thousand tiny paper cuts is an excellent description and if you raise these incidents in isolation you look like you are blowing things out of proportion and if you try to create context  by speaking of them in a larger picture you are accused of holding grudges and being hysterical and generally being unreasonable.

“We see these stories, ‘Why aren’t there more women in computer science and engineering?’ and there’s all these complicated answers like, ‘School advisers don’t have them take math and physics,’ and it’s probably true,” said Lauren Weinstein, a man who has spent his four-decade career in tech working mostly with other men, and is currently a consultant for Google.

“But I think there’s probably a simpler reason,” he said, “which is these guys are just jerks, and women know it.”

The choice for people who are uncomfortable with the “bro” culture is to try to change it or to leave — and even women who are fed up don’t always agree on how to go about making a change.

Firstly, yes #notallmen are jerks.
Secondly, I think that we should admit that there is unlikely to be one true way to make the change and should not overly stress about finding a homogeneous solution and be willing to support efforts to effect change even if they are not done the same way as we personally would have implemented them.

Writing code is a high-pressure job with little room for error, as are many jobs. But coding can be stressful in a different way, women interviewed for this article said, because code reviews — peer reviews to spot mistakes in software — can quickly devolve.

“Code reviews are brutal — ‘Mine is better than yours, I see flaws in yours’ — and they should be, for the creation of good software,” said Ellen Ullman, a software engineer and author. “I think when you add a drop of women into it, it just exacerbates the problem, because here’s a kind of foreigner.”

“I’m in no way saying that women can’t take a tough code review,” she added. “I’m saying that no one should have to take one in a boy-puerile atmosphere.”

As I have not worked in an environment with formal code-reviews, I cannot comment. But on anecdotal evidence and based on conversations with both men and women in tech my thoughts on this are:
1. Initially getting used to code reviews is tough. Learning to take any kind of constructive criticism is a skill, and considering that coding is an act of intellectual labour that is often accompanied by strong emotions, it is natural for coders to feel sensitive about feedback.
2. The biggest challenge in any code review is ego and preconceived notions.
3. Some men are intensely threatened by women and resent any feedback them. And I have heard guys say that they are much harsher in their reviews then some of their female colleagues and get far less grief about it.
4. People need to reframe code reviews from being threatening and personal attacks to being a form of mentorship and improvement. (Honestly, has any code not looked at some of their past code and gone “What! Why did I do it this way. I am much better now”

But the debate isn’t over. In fact, Ms. Shevinsky now finds herself in another argument. This time, however, she’s on the defensive with other women.

A prominent feminist in tech told her that she was doing a disservice to women by accepting Mr. Dickinson’s apology and working with him again. The conversation, Ms. Shevinsky said, was “hateful.”

Ms. Shevinsky says that she judges Mr. Dickinson “on his actions, how he is with other people in the company and with me,” and said that there was no contradiction in both working with Mr. Dickinson and supporting feminism in tech.

By virtue of being human people are going to make mistakes and be insensitive and possibly, unintentionally misogynistic. I believe that we should allow people to move on from their mistakes. As I stated above I also believe that we should allow women to have their own agency and allow for a diversity of approaches to women in tech.

Lea Verou, an incoming Ph.D. candidate in electrical engineering and computer science at M.I.T., wrote in a much read essay that women-only conferences and hackathons “cultivate the notion that women are these weak beings who find their male colleagues too intimidating.”

“As a woman,” she wrote, “I find it insulting and patronizing to be viewed that way.”

I strongly disagree with this view, and find that these environments allow for a different form of collaboration and openness, and to find it to be an environment that counters systematic, unconscious misogyny as well as outright hostility.

Love and (lots of) thoughts about being a woman in tech,
Trisha

30 Jul 2018 by Trisha Cornelius

Filed Under: Development Tagged With: autobiographical, Diversity, Women in Tech, WordPress, WordPress Joburg, WordPress meetup

New Year’s Day Technical Trouble: Fixing the White Screen of Death caused by WordFence

Hello Blog,

On New Year’s I decided to write my new year’s wish, and when I came to visit my site it gave me the white screen of death (WSOD).  (For the blessedly uninitiated, the white screen of death refers to the empty browser window filled with white instead of your WordPress installation). My reaction was along the line of: “Seriously! Exactly two years ago my site was down like this. I am through with [REDACTED hosting company name]”. New Year’s day is a difficult day for me, being the anniversary of my dad’s death. But, unlike two years ago I felt that I could do my own technical support. I settled in to fix my blog. Step zero was making a complete backup of the server.

My first port of call was to start a technical support chat with the hosting company’s technical support. (Based on issues I have had along the way with them I was not entirely unconvinced that they had messed up. Spoiler: they hadn’t) So, the helpful guy on the other end of the chat had a quick look and came back with the verdict that it looked like WordFence was causing issues on my site.

It is definitely prudent to run a Web Application Firewall (WAF) on any WordPress site at the moment, but I admit my frustration that my site’s downtime was caused by the very thing that is meant to protect it. I have neither reached out to WordFence, nor looked through their documentation, in order to see whether I was just particularly unlucky or there is a known issue that was causing the particular crash.

Once I established that WordFence was the issue I went into my cPanel (you can just as easily do it through an FTP client) and began renaming the plugin folder. This gave me some progress, instead of getting a WSOD I instead got the error message:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 
Fatal error: Unknown: Failed opening required '*/wordfence-waf.php' (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in Unknown on line 0

This meant that I had something to Google which led me to find that WordFence adds some php to the user.ini file, and that I needed to delete:

php_value auto_prepend_file '/home/public_html/wordfence-waf.php'

from it. Thank you to wfasa for her reply on a ticket in the WordPress.org support thread which allowed me to figure this out.

That should have taken care of the initial error, but when I tried to access my site again (even after clearing my browser’s cache) I got that same error.  Between myself and the  support agent, we figured that W3TC might be presenting the cached error messages instead of the site. And so, next step in this mission was to disable W3TC without having access to the /wp-admin dashboard.

This was where things got slightly more technical. Firstly, because I needed access to the .htaccess file I needed to change my control panel’s settings to view hidden files. My Google-fu took me to a helpful post by Journal Xtra on how to remove W3TC manually. I was battling to get his fix to work with my wp-config.php permission set to 755 so I decreased the permissions to 644 (I don’t have sufficient server side knowledge to know if this was a bizarre quirk, something related to the cPanel issues I was having due to my Firefox preferences of opening links in a new tab (eventually I was doing the technical things in Chrome), or something unrelated that got tweaked along the way). After permissions were set to 644 and I had deleted:

  • w3-total-cache-config.php
  • db.php
  • advanced-cache.php

I edited my .htaccess to remove the blocks of code inserted by both WordFence and W3TC. This was made easy and stress free by the fact that I had done a complete backup of the files on the server before I started tinkering and that the code inserted into the .htaccess by both plugins was clearly commented out.

Finally, when I refreshed my site and was greeted by my WordPress installation. I then eventually, hours after I had planned to was able to write my post).

[Sidenote: When I rename files or folders like this I literally append _renamed to the folder or file because it changes the path and makes it super easy to find what you have changed. When you are doing this type of thing you really should keep track of what you are changing for two reasons, one so you can replicate the fix in the future and two so you can undo the fix in the present if you mess something up. ]

Love and fixing my own stuff,
Trisha

9 Jan 2018 by Trisha Cornelius

Filed Under: Miscellany Tagged With: Posts that I wrote through the panic, Troubleshooting, W3TC, White Screen of Death, WordFence, WordPress

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »

Primary Sidebar

A cartoon twitter bird with a cup of coffee

Tweets by trishawebs

And nothing but the truth

Hi,

I’m Trisha. This is my personal blog and all opinions are my own. I don’t set out to offend people about trivial things, but if you disagree with basic universal human rights we are probably going to butt heads.
If you follow a link to a site that sells you something, there is a good chance that it is an affiliate link which means that I might get a small amount from the sale. (It won’t change the price you pay).

  · Copyright © 2022 · Patricia Cornelius ·

  · Built on the Genesis Framework for WordPress lovingly customized by Trisha Cornelius ·

Copyright © 2022 · Trisha Cornelius on Genesis Framework · WordPress · Log in