WordPress Permissions

I use the WordPress blogging software for a couple of blogs including Macessence. It is really excellent software with tons of plugin functionality. If you are knowledgable enough, you can do just about anything with WordPress. I consider myself an intermediate user of WordPress. But, I know enough to be able to tweak a few things. Case in point, Permissions.

Permissions

Everything in the whole wide world of computers has permissions associated with it. WordPress is no exception. Most WordPress files are in the .php format. This is a little technical, but here is a description of how .php works:

PHP is a scripting language that is often used to develop a variety of web pages and Internet applications. Files that have the .php extension can contain text, HTML tags and scripts. These files are processed by a remote server and are then returned to the user’s Web browser as plain HTML. Oftentimes web pages will use PHP files in order to process their online forms or to access information from an online database. For example, when you sign up for a mailing list or submit contact details to a website, you may be doing so via a PHP scripted form.

WordPress pretty much maintains it’s own Permissions to the copious amount (and I do me a lot) of files in it’s normal install. Here is a typical WordPress install of one of my blogs:

You can see all the .php files in there. A WordPress user does not need to fiddle with Permissions. However, once in a while WordPress will inform you of a Permissions issue. Here is a case in point. There are several settings in my WordPress install including one called Permalinks. What is a Permalink? Here is a typical definition:

A permalink or permanent link is a URL that is intended to remain unchanged for many years into the future, yielding a hyperlink that is less susceptible to link rot. Permalinks are often rendered simply, that is, as friendly URLs, so as to be easy for people to type and remember. Most modern blogging and content-syndication software systems support such links. Sometimes URL shortening is used to create them.

In the case of the WordPress blog, I want links to my articles to be easy to understand and permanent so people can reference them for years to come if necessary. You probably wonder where I am going with this, just hang in there. It is going to lead to something that is very cool.

I was working in the Settings of my WordPress blog the other day and discovered this message from WordPress in the Permalink area:

If your .htaccess file was writable, we could do this automatically, but it isn’t so these are the modrewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

It is very important to have Permalinks functioning properly on a WordPress blog. Making a file “writeable” deals with Permissions. So how do I make a .htaccess file writeable and just what is an .htaccess file anyway?

.htaccess is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in a directory which is in turn ‘loaded via the Apache Web Server’, then the .htaccess file is detected and executed by the Apache Web Server software. These .htaccess files can be used to alter the configuration of the Apache Web Server software to enable/disable additional functionality and features that the Apache Web Server software has to offer.

Again, a little technical. The .htaccess file contains some of the settings for your WordPress blog, in this case, the settings for Permalinks. The bottomline is this, I had to change the Permissions on the .htaccess file in my Macessence blog to make it writeable so the Permalinks would work correctly. This is where I discovered something really cool.

There are two ways to access the actual files that make up a WordPress blog. You can either use the control panel for that blog which is setup by your ISP or you can login to where the blog files are installed on the server with a FTP (File Transfer Protocol) application. In this case I used the venerable FTP App Transmit by Panic Software. The new Transmit version 5 has some nice new features. I am only going to look at one of them for the moment, more on Transmit 5 in a later article.

So, I logged into my Macessence WordPress install using Transmit:

When I clicked on the .htaccess file Transmit produced the file Permissions in the Inspector area in the right column. That is very cool! I thought I was going to have to download the file, change Permissions on my Mac and then upload it again. Because of this new feature in Transmit 5 all I had to do was click on the Permissions setting that I wanted in that right-hand column:

I gave the .htaccess full permissions (777) as suggested by WordPress. Now, my Permalinks should function better. Every little bit helps.

Conclusion

So, this was a somewhat circuitous route to my TaDa!! Moment. Hopefully, it was worth it. It is really cool to be able to login to a WordPress blog or regular website and change the file permissions on various files right in the site itself if you need to do so. Transmit 5 is turning out to be a much improved application. I will be doing an article on it in the near future.