Joomla is an open source content management system. This means that you can see and edit any file in your Joomla installation to fit your needs.

The issue becomes that you need to know what you are doing when you edit the files. There are many dangers to going in and editing files. You can break your site, change the functionality, create conflicts and cause a nightmare situation when it comes time to upgrade the Joomla installation or upgrade the extensions.

Steps to take when customizing your Joomla installation

Backup - backup - backup

ALWAYS run regular backups of your Joomla folders and database. In addition to these regular backups, run a backup just before doing an upgrade, adding a new extension, or making any major alterations.

There are extensions, like Akeeba, that make the backup and restoration easier. Be sure you know how to backup your site, and how to restore it.

Develop your site offline

You should not be doing your web development, styling changes, major content modifications, etc. on a live site. You run the danger of clients seeing the site in development, visitors becoming confused and search engines indexing the wrong content.

You can choose to do one of three things for developing your Joomla website offline:

Option A: Develop your Joomla website on a local computer. The local computer needs to have a XAMPP or WAMP program installed. These programs emulate an Apache/PHP/MySQL environment that Joomla needs to function. Developing locally means that the search engines and visitors can not see your site.

There are some downsides to developing locally. If there are multiple developers or contributors, it can prove difficult for them all to access the site. If you are doing the site for a client, it makes it difficult for them to review and approve the site from their own location. It also requires packing up the site and moving it to a hosting server when it is ready to go live. You will also need to make changes to the configuration.php file to point to the hosting database name and password and other small changes.

Option B: Develop your Joomla website on the hosting server with the offline setting enabled. You can develop your Joomla site on the hosting server in the root without the world and search engines seeing it by choose Yes to the Site Offline setting in Global Configuration. This means that no one can view the site without logging in first.

You  won't want to use this method if there is a current website at this URL. It is not a good idea to mix the Joomla folders in with a live sites files and folders.

Option C: Develop your Joomla website in a sub-directory on the host server. You can install a Joomla installation in a sub-directory then move it to the root when it is ready. You should add the name of the sub-directory to robots.txt so that the search engines do not index it. This is not fail-safe, so you can also take the Joomla site off-line which means that it requires a login name and password to view the site. 

The plus side to developing in a sub-directory is that you can leave the live website as is during development. Also you can use the database and Apache environment of the hosting service. You can allow your client or other developers to view the site for approval. You should be sure that you created a separate database from any live site if you take this route. You will need to remove the live site's files and also make a couple edits to the configuration.php on the new site when you move the site to the root folder.

Don't edit the Joomla core files

You can create overrides and place these files in the proper location in your templates html folder. If you do edit the core files, your changes can be lost when upgrading your Joomla site. Not all core files can be replaced with overrides, so keep a log file of which files were edited and what the edits were.

Refer to this joom3 article regarding creating overrides: Creating template overrides

Add a custom style sheet to your template

Whether you are using one of the included templates for Joomla or you are using a 3rd party template, you likely will find that you need to make some changes to the styling. If you edit the style sheets that come with your template, you run the risk of losing this custom styling when you upgrade. You also have to wade through possibly hundreds of lines of code to find what you are editing.

We suggest adding a custom style sheet so that your styles are all in one small file. You need to add a link in the index.php for your template so that it knows to look for this custom style sheet. The custom style sheet needs to be loaded after the style sheets included in the template so that your styles override the earlier styles.

Refer to this joom3 article on adding a custom style sheet: Adding your own custom stylesheet

Edit the index.php in your template's folders

If you look at all the files in the directory structure of Joomla, you will see multiple index.php files. The index.php file that resides at the root of your template's folders is the heart of your Joomla website. This file compiles all of the various settings, components, modules and content for each page to be displayed on the screen. If you want to change the layout, add new module positions, link to additional style sheets or javascript files, you do it in the index.php for your own template.

Always make a safety backup of the index.php before you edit the original file. An error in your index.php will break your site. You will also need to redo any modifications to the index.php of your template when you upgrade. With some upgrades you can simple replace the new index.php with the older version, but you run the risk of major changes having been made to the index.php with the new upgrade that you will lose if you replace the file.

Refer to the following joom3 articles on customizing the index.php file:

Adding a custom style sheet

Adding custom module positions