Most WordPress users don’t have to mess around too much with files and folders. Even advanced users need to usually only modify functions.php, and the theme files. And they can do this easily from within the WordPress interface itself via the in-built editor for plugins and themes. However, if you set up WordPress regularly for your clients, you might need access to a bunch of other files that aren’t easily accessible.
When you Can’t Use cPanel
You often have to modify files that are located at the WordPress root directory like .htaccess or wp-config.php. These are inaccessible through the regular WordPress interface. Traditionally, the best way to edit these is by logging into cPanel, opening the file editor and making the changes there.
cPanel is still the best way to make these changes. If something goes wrong and WordPress crashes, you can easily revert the changes since the file manager in cPanel isn’t dependent on WordPress. So if you can use cPanel, you should.
However, there could be times when your client is uncomfortable giving you access to their cPanel backend. After all, it requires quite a bit of trust to share those credentials. But more than likely, your client doesn’t even know what cPanel is, and what their credentials are! Often, someone else would have set up their blog for them and left it at that.
After all these years, it’s easy to forget that the average person running WordPress only needs to know what’s necessary to run their blog on a daily basis, and knows nothing about the backend, or the terminology associated with it.
Modifying .htaccess with Yoast
Before I show you the full-fledged file manager, here’s a common use case scenario – modifying the .htaccess file. Most WordPress users already have the well-known “Yoast” SEO plugin. With it, you can make changes to .htaccess by clicking the “File editor” link under “SEO -> Tools” as shown here:
Now you can make your changes and save them.
No additional plugins necessary!
Using a Full-Fledged File Editor
If your file editing needs run deeper than changing .htaccess, you’ll need to install a new plugin. I personally use “File Manager”. You can download and install it from the WordPress plugin repository. Once installed, you can easily access it from the WordPress dashboard under the “WP File Manager” entry on the left-hand side.
Once you go to the page, the plugin will present you with a familiar interface as shown here:
You can navigate between folders and see all the files in your WordPress root directory. Note that you can’t navigate upwards beyond a point where you don’t have permissions. The plugin uses the permissions that WordPress itself has, so you’re limited in what you can access. If you have multiple WordPress installations for example, you can’t look at the files from another setup.
You can also modify the files using the “Code Editor” menu item on right-click. For example, if you need to modify your wp-config.php details, you can bring up the code editor like this:
The resulting interface is complete with line numbers to give you a sense of what you’re editing. This particular plugin is free, but the professional version comes with a bunch of other features that you may want to check out!
To recap, if at all possible, try and edit WordPress files either through the native WordPress interface or through cPanel. Personally, I try not to use the WordPress interface at all – I’ve gotten burned too many times. But sometimes when you don’t have access to cPanel, and the native WordPress interface doesn’t give you the access you want, then the WP File Manager plugin can step in to fill the gap.
I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!