最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Update wordpress theme without customization loss

programmeradmin1浏览0评论

My client asked me to update his theme. I have listened that when theme updated all of custom code is overwritten. Now I want your clarification in following things:

  1. How can I check that weather the theme has custom coding or not,
  2. How can I safely update the theme without any customization loss and any data loss.

Please help me in this regard.

My client asked me to update his theme. I have listened that when theme updated all of custom code is overwritten. Now I want your clarification in following things:

  1. How can I check that weather the theme has custom coding or not,
  2. How can I safely update the theme without any customization loss and any data loss.

Please help me in this regard.

Share Improve this question asked May 6, 2019 at 13:05 ItstudentItstudent 32 bronze badges 1
  • 1 This can't be done without extensive manual adjustment, your not supposed to be able to do this, that's why child themes exist – Tom J Nowell Commented May 6, 2019 at 13:20
Add a comment  | 

1 Answer 1

Reset to default 3
  1. Download a copy of the theme - if it's available in the WordPress repository, grab that. If it's a premium theme, have the client provide their credentials to download, or just have them provide the .zip file directly. Make sure that you obtain the exact version that is being used on the client's site - not the latest version.

Then, download the theme they're currently using, and use a file comparison tool such as BeyondCompare to compare the files. Make a list of whichever ones are different.

  1. The only safe way to proceed is to create a child theme. You'll want to copy only the customized files into a separate folder, and create a very simple style.css file with comments at the top that tell WP this is a child theme of whatever the parent is.

Then, you can delete the parent theme, upload the "clean" copy (the one you obtained directly, not the one they were previously using), upload the child theme, and activate the child theme.

From then on, you can safely update the parent theme as often as needed. Occasionally you may still need to update the child theme - whenever the parent makes significant changes to the files that are in the child theme.

发布评论

评论列表(0)

  1. 暂无评论