Editing the WordPress .htacces file on Mac OS

Earlier today, I was attempting to edit the .htaccess file of my WordPress site on my Mac. To begin with, I couldn’t see the file on my cPanel hosted File Manager (it is set up as a hidden file). In order to get to the file, I had to FTP a copy across from my server onto my client machine, which happens to be a Mac.

Now I’m familiar on how this works with a PC – I’ve been a PC user for over 20 years now. Doing this on a Mac was a little different.

The issue was that even though I know I had downloaded my .htaccess file to my folder on my Mac, it wouldn’t show up. It was hidden. Unlike windows, there’s no easy way to “Show hidden files” in Finder as there is in Windows Explorer. I had to Google how to do it. Here’s how…

To show hidden files, first open up the Terminal app. If you’ve never used this, it’s here:

Applications > Utilities > Terminal

Right after the dollar sign you can go ahead and type or paste in the code below, and press enter.

defaults write com.apple.finder AppleShowAllFiles TRUE

At this stage, nothing will happen. To put the changes into effect, you will need to restart Finder for the changes to take effect. To do this, you can either

  • press option+command+esc to open the Force Quit Applications window, select Finder from the list and hit “Relaunch”, or
  • simply type in the code below in the Terminal window, and again press enter.
killall Finder

If you typed those lines correctly, your desktop icons should disappear for just a second while Finder restarts. Your changes have now gone to effect, and you ought to be able to navigate to your folder, and see your .htaccess file.

At this stage, all hidden files on the system ought to be visible. A lot of these will be system files.

You need to be careful while remembering that deleting any system files can break stuff on your computer. You need to take care not to edit anything that you are not familiar with.

Once you’re done editing your .htaccess file, you will probably want to restore your settings so that you don’t delete something by mistake.

To hide the files again, go back in the Terminal window, and type the following code in:

defaults write com.apple.finder AppleShowAllFiles FALSE

You need to restart Finder just like you’d done previously with killall Finder or the Force Quit Applications window. That’s all there is to it!

Windows 10 DOS Here

 

As an occasional developer, I like the ability to be able to right click and bring up a Command Prompt with minimal mouse clicks. In previous versions of Windows, there used to be the “DOS Here” Powertoy. Windows 10 got a little simpler, where by holding the shift key down while right clicking on a folder name, you can invoke a DOS Prompt at the location of the folder. No additional software tweaks required.

Windows 10 Powertoys

If you’re a legacy Windows Power User, you would have appreciated the benefits of having the Windows Powertoys are your service. Windows 10 offers this too, though there is a small hack behind it. To enable Powertoys in Windows 10, create a folder on your desktop and name it:

PowerToys.{ED7BA470-8E54-465E-825C-99712043E01C}

The icon will change from a regular folder to a control panel like icon. It will contain “power user” settings for Windows 10, which while nowhere as impressive as in earlier versions of Windows, makes it convenient to have it all in one place.