• wprun

    (@wordpressrun)


    My client’s previous developer setup a theme with custom css and php files and no child theme. The theme is from themeforest.

    What is the best way to update the theme to the last version without losing the css and php files ?

    Ideally Id like to set this up with a child theme, so what is the best way to set it up this way, for best practice moving forward? Should I setup a child theme, copy the css and php files to the child theme and then update the parent theme by overwriting the parent theme or perhaps replacing it completely?

    Thanks!

    • This topic was modified 7 years ago by wprun.
Viewing 4 replies - 1 through 4 (of 4 total)
  • wpbees

    (@wpbees)

    Hello.

    Try backing up your theme files manually first via FTP.

    Go to /wp-content/themes/ and download your theme folder to your computer.

    Make sure you have a complete copy of your theme folder as a back up available on your computer. Then manually download the updated version of your current theme from their site.

    Best to child theme the updated theme at this stage before you proceed with the next stage.

    You should now have both, a new version of the theme and your old customized theme on your computer. If you remember the changes you made to your theme, then simply copy and paste the code snippets from old theme to the new version.

    If not, try to use a comparison tool to identify the changes between your old files and the newly updated files of your updated theme.

    Hope these help.

    RossMitchell

    (@rossmitchell)

    Much as wpbees said, but I suggest that you get a copy of the theme of th version that the previous developer started with, just maybe they left around a ZIP file, otherwise themeforest may have it. Now do a 3 way compare of the theme files:
    -Original theme
    -Customized theme
    -updated theme
    This will help you identify the first developer’s changes and help you incorporate them into the new child theme you are creating.

    Thread Starter wprun

    (@wordpressrun)

    Thank you.
    What is the best comparison tool?
    These 2 seem good: https://winmerge.org/ https://meldmerge.org/

    Also, when updating the parent theme, is it best to completely delete the old version first before uploading, or just overwrite the theme folder?

    Thanks!

    RossMitchell

    (@rossmitchell)

    Suggest that you try out different programs.

    I would rename the old parent theme directory then upload the new one. Leave the old one accessible just in case. Otherwise if you have no choice then delete the old one completely because some upload programs occasionally glitch when overwriting files, not sure why, they just do.

    • This reply was modified 7 years ago by RossMitchell. Reason: clarification
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Updating theme with custom code and no child theme’ is closed to new replies.