Skip to content

Mstoic

  • Home
  • Start Here!
  • Best Deals
  • Facebook Tricks
  • Privacy
  • Resources
  • TOC
  • Tools
    • Web Tools
      • Stop Watch
      • QR Code Generator
      • Adsense Code Converter
      • Blogger Sitemap Generator
      • Difference Between Two Texts
      • Vacation Checklist
      • Twitter Symbols
      • Count Down
    • Investment
      • SIP Calculator
      • Power of Compounding
      • PPF Calculator
      • FD Calculator
  • About Us

2 Ways to Edit Functions.php File in WordPress

Editorial Team | December 26, 2013March 3, 2017 | Wordpress |

There are very less customizations that you can do on WordPress websites without editing the functions.php file of your active theme. This is because every function and filter is defined in this file. And if you are a newbie, you won’t know how you could edit this file. I will show you two ways of editing the functions.php file, one is from WordPress dashboard, and the other one is by using a FTP client.

Editing Functions.php File From WordPress Dashboard

  1. Login to your website’s WordPress admin area.
  2. From the left pane, navigate to “Appearance > Editor“
  3. Theme-Editor-WordPress
  4. All the important files from the active theme’s directory will be listed in the right sidebar. Click on “functions.php“.
  5. Theme-Functions-WP-Dashboard
  6. As soon as you click this, the page will refresh and you will be able to edit your theme’s functions.php file.

Things to remember

  1. Make sure the code you add is from a reliable source and is free of errors. Adding erroneous code to your functions.php file can break your website completely.
  2. The editor that you get in WordPress does not show any errors of any kind. Check your code for any errors with some PHP editor. Using Notepad++ (free) or DreamWeaver (paid) is a good option.
  3. Every function you need to add goes before the last “?>“, which marks the ending of PHP code.

4 Ways To Enable Gzip Compression In WordPress...

How to Edit .htaccess File from WordPress Dashboard Itself...

22 Things To Do For A Faster WordPress Website...

What After You Break Your Website

If you ever break your website while editing the functions.php file, then you will not be able to reach the WordPress admin area. For a quick solution, you can login to your hosting control panel and edit the functions.php file using the file manager. The file is usually located at “public_html/wp-content/themes/your_theme_name/functions.php” on shared hosting, and “/var/www/wp-content/themes/your_theme_name/functions.php” on Virtual Private Servers.

TIPInstead of using your hosting control panel, use a FTP client like FileZilla. You can easily edit, download and upload files using a FTP client than you would do in your browser. This also gives you the flexibility of using any text editor of your choice.

Using FileZilla To Edit functions.php File

  1. First download and install FileZilla
  2. Go to “File > Site Manager”
  3. FileZilla-Site-Manager
  4. Enter all your hosting details, viz., Host, Port number, User ID and Password. Then click the “Connect” button to login.
  5. Login-To-FileZilla-Site-Manager
  6. Search for the “functions.php” file on the right pane and download it on your PC.
  7. editing-functions_php-FileZilla
  8. After editing the file, upload it back to your server and overwrite the existing file.

I use Adobe DreamWeaver to edit my theme files. It connects to my Web Server directly and uploading and downloading files becomes just a matter of few clicks. If you don’t want to buy a paid product for this, then Notepad++ and FileZilla can get the job done.

Previous Post

The Best Settings For WP Super Cache Plugin For Wordpress

by Editorial Team

Next Post

How To Display Featured Image In RSS Feeds In WordPress

by Editorial Team

Recommended Next
Auto Update Plugins And Themes In WordPress

Discussions

  1. Rafaqat
    December 29, 2013 at 21:22

    Playing with the theme code need much care and especially with css file and functions.php,but thanks for your guideline,it will surly help next time.

    Reply

Your Comment Cancel reply

Follow Us

Like us Follow us Follow us

Categories

  • Tricks (93)
  • Facebook (83)
  • Tips (76)
  • Windows (67)
  • Wordpress (39)
  • Android (38)
  • Internet (33)
  • Antivirus (30)
  • How To (29)
  • Webmasters (25)
  • Customization (25)
  • Downloads (21)
  • Utilities (21)
  • Gmail (20)
  • Windows 7 (19)

Related Articles

  • Reverse a String using StringBuilder