If you use the Astra theme and have modifications to make to the theme’s PHP files or customizations to add in the form of functions, ideally you should not modify the theme files, but create a child theme.
It is never recommended to modify the files of the active theme because when you update they will be lost, so it is better to create a child theme.
The Astra theme is not an exception, and although you could use some generic plugin, is not necessary, because on the same website of the creators of the theme you have a child theme generator for Astra.
If you choose the simplest option, just name it and click the “Generate” button, but I encourage you to display the advanced options to customize it.
You will be able to customize the version number of the child theme, be the author, with the URL of your website and define your own description of the child theme.
In addition to specifying a custom slug (folder name) and even uploading your own custom image.
When you are done, just click the “Generate” button to create your child theme and it will automatically start downloading a ZIP file with your child theme.
Now just go to your WordPress administration and in the Appearance -> Themes section add the new theme by uploading it.
Once installed you just have to activate it and you’ll have your Astra child theme.
Now you can start to…
- Copy to the child theme the files of the parent theme (single.php, index.php, etc.) that you want to modify (always respecting the paths).
- Add customizations to the functions.php file of the child theme.
- Customize, menus, widgets, settings, etc. (normally the child theme will inherit these settings but it is worth checking).
Easy isn’t it?
Read this post in Spanish: Cómo hacer un tema hijo para Astra