3 Ways to Access and Edit Your WordPress Files

>3 Ways to Access and Edit Your WordPress Files
  • folder

At some point, almost every webmaster will need to access their WordPress website’s files for different reasons: to fix something, add a piece of code to change a feature, backup, etc.

In this post, I’ll tell you how to access and edit your WordPress, themes and plugins files by using 3 different methods.

1. Access your files via WordPress “Editor”

The “Editor” is a WordPress built-in feature that allows you to access your themes and plugins files from inside your Dashboard. You can’t access your WordPress core files from here; check the second and third method for that.

Note: This feature might be disabled due to some security features/plugins you might use!

Accessing your theme files

  • Log into WordPress, of course.
  • Go to Appearance -> Editor.

wordpress theme editor

  • As you can see, on the right side, you have your current theme’s files, and on the left side, the area where the file’s code is displayed. There, you can add, remove or modify any piece of code you want. Don’t forget to press the “Update File” button.
Edit Themes in WordPress

Click to enlarge

Accessing your plugins files

  • Log into WordPress.
  • Go to Plugins -> Editor.

WordPress plugin editor

  • There, you’ll see that things work like in the Theme Editor. Choose the plugin that you want to edit from the top-right corner, select the file from the right side, and then edit away.

2. Accessing your files via cPanel

cPanel is the most popular and most used control panel, and we’ve always worked with it, as many of you, I assume.

  • First thing you need to do is to log into your cPanel, of course, which you can usually access by inserting your domain in your browser, followed by /cpanel (e.g. http://yourdomain.com/cpanel).
  • Then search for your “File Manager”.

Siteground cPanel File Manager

WordPress root files in public_html via cPanel

  • The files that you’ll access the most will be the themes and plugins files. You can find those by clicking the wp-content folder, under the public_html one.

WordPress wp-content folder in cPanel

  • Now, if you want to edit a file from a theme, for example, just click on the themes folder, choose the theme you want, search for the file you need to edit, then right click on it and choose “Code Edit”.

Edit theme files in WordPress via cpanel

  • After that, the file will open and you can edit what you need. When finished, press the “Save” button found in the top-right corner.

3. Accessing your files via an FTP client

An FTP client is a software that allows you to edit and transfer files back-and-forth between your computer and your website’s server.

The most popular FTP clients are FileZilla and SmartFTP.

I’m using SmartFTP, so I’ll show you how to connect on that one. If you want to know how to connect and use FileZilla, check out their tutorial here.

So, in order to connect SmartFTP to your website’s server, you’ll need to go to “File” and select “Connection”. Once the connection pop-up appears:

  1. Insert the “Host”, which is ftp.yourdomain.com (replace yourdomain.com with your real domain/site name, of course).
  2. Insert the username and password for the FTP. These are usually provided by your web hosting provider after your purchase their services.
  3. Press OK and you should now connect to your website’s server, if everything goes right.

SmartFTP connection

After the connection was created, you’ll notice that the layout is similar to cPanel. The editing process is also similar; just right-click on a file and select “Edit”.

Edit a WordPress file with SmartFTP

Download the file that you want to edit as a backup!

That’s a wrap

Hope you found the post comprehensive and useful! If so, don’t forget to share it with your friends!

If you have anything to say or ask, please drop a comment, or write us via our contact form or Facebook page.

By | 2018-06-18T02:05:03+00:00 March 1st, 2016|Plugins, Themes|0 Comments

Leave A Comment

Get our latest posts once a week, right in your inbox