WordPress updates overwrite .svn folder - wordpress

We're using Subversion to keep track of the changes our web team makes to our Wordpress site. We do nothing more than modify and update our custom theme, but we have difficulty updating the Wordpress core and plugins.
Right now, I have my checked out copy working on a local WordPress install. However, when I run the automatic WordPress updates on this local copy, the updates overwrite the .svn folders in the respective subfolders, resulting in a "Directory .svn containing working copy admin area is missing" error when I try to commit the update.
How can I do these updates automatically without overwriting the .svn folder? As of now I am resorting to copying the files in manually.

If you're just maintaining your theme, you should not have the whole wordpess install under svn but just the theme. I also think in your case it doesn't make sense to actually use a working copy of your repository in the actual live site. In your case I'd keep a working copy of your theme somewhere on your server and then rsync on demand to your theme folder. This way you can update wordpress and your plugins automatically and without problems.

Related

WPengine and git

For some weird reason when I push to wpengine, my files get updated without a problem -- but it will not delete files only within my the theme folder.
Here is a list of what's going on:
I have no trouble deleting the theme file, the theme will be removed. However if the theme is added back, the removed files within the folder are still present
When I pull the git repo the files are correct
Any file removed within the theme's directory is not updated
I reverted the environment back to the production (by overwriting the env with production's db and files), when I pushed my code everything was correct.
I have NO idea how to fix this. Please help!
suwebdev/wpengine mentions:
Custom components of this site are created as themes and plugins.
These are stored in separate repositories and brought into the production code using Git submodules.
Double check if you see a .gitmodules in your main repo, which refers to your themes folder you are trying to update.
That would explain why a local change (within the theme folder, which is actually its own Git repository, as a submodule) is not reflected to your deployment process.

Whether wordpress automatically backup old theme before updating the theme?

I have developed many scripts and have put inside the theme folder of wordpress. Today somehow the theme got updated automatically. Now all the scripts gone. Nothing was there. Whether wordpress will backup the old theme somewhere before it updating the theme automatically?
PS: I haven't installed any plugin to backup automatically!
Thanks for your replies
Wordpress will update and overwrite all the default (included) themes when it upgrades, so your changes will be overwritten.
To prevent this in future you should use a child theme, or manually upgrade by downloading the zip file from wordpress.org, unzipping it, and deleting the files that you don't want to be overwritten, then copying that across your existing installation. Creating a backup before you do this is also a good idea.
To prevent this I strongly recommend that next time you work around with a child theme instead of editing your main theme files. This will prevent your edited files to be overwritten when the theme updates itself. Also start using a plugin that backups your files.
Wordpress itself doesn't backup any files prior to updating Wordpress, themes or plugins. What got overwritten is now overwritten. You can contact your host support and ask them if they made any backups on your site (some hosts do that on a weekly basis so they can revert changes in case of an error - but this is on a host by host basis and not all do this).
Hope this will be a good lesson for you to think about this things beforehand and I hope you retrieve all your lost files.

Will my plugins be deleted, after reinstalling wordpress?

I want to install custom theme on wordpress, but have some errors while uploading it. now i want to reinstall wordpress from Cpanel file manager, will my plugins be deleted?
Your Theme and Plugins are stored within the wp-content folder, which is 'inside' WordPress. So, yes, deleting WordPress would delete your Plugins and Themes.
Solution:
Download Filezilla.
Head over to httpdocs > wp-content folder, where you should see two folders entitled plugins and themes.
Drag these folders over to your Desktop (or wherever suits you). What you are doing here, is creating a backup of your Theme and Plugins.
Go ahead and reinstall WordPress (To make a clean install, obviously remove all reference of WordPress and create a new MySql Database)
Once completed, simply access your website via Filezilla again. Head back into httpdocs > wp-content and drag back over the your plugins and themes folder.
By following the above, you can delete WordPress, without losing your Theme files or Plugins.

Updating Wordpress tracked with Subversion

I have all my client sites on their own repos for tracking changes with svn but when I update through the Wordpress admin panel (Wordpress or plugins) the directories for them are deleted and replaced, removing the .svn files.
This then breaks my svn as I keep getting the following,
Commit failed (details follow):
Directory '/website/trunk/wp-content/plugins/plugin-dir/.svn' containing working copy admin area is missing
Does anyone know a way to auto-update through the Wordpress CMS with it deleting any svn files?
This page has a procedure of setting up the process properly:
https://wordpress.stackexchange.com/questions/23052/updating-a-wordpress-plugins-breaks-svn

Wordpress Site As Subversion Working Copy

I am currently developing a site based on WordPress (3.3) and am having an issue keeping it up to date properly in subversion (my personal svn server), wondering if I could get any help/guidance on how to handle this. I have a working copy checked out, and everything is working fine, accept for when I update a plugin and/or WordPress itself...here's an example for the Woocommerce plugin (hopefully I explain this well enough):
Woocommerce notifies me of update
I update the plugin using the WordPress dashboard
WordPress deletes all files in the wp-content/upgrade directory, and the plugins/woocommerce directory (including the .svn folders).
I then try and either do an svn add and/or svn commit and get errors about the upgrade and woocommerce directory's 'working copy admin area missing' plus a whole bunch of other problems.
I want to be able to keep this WordPress site in subversion and keep the plugins directory updated, so that I can eventually do an export when I'm ready to move the site to my server, but this is proving to be exceptionally difficult (I can re-checkout and replace the .svn directories for each of the WordPress folders that are missing them, but there are a lot of folders, and is very tedious. I can ignore the upgrade and plugin folders, but then they don't get updated and my export won't go as planned...what should I do?
One thing that will help a lot is to upgrade your client to Subversion 1.7. Instead of a .svn folder in each folder, it has a single .svn folder in the root of the working copy and will keep better track of things.
After you upgrade your client, do svn upgrade at the root of your working copy. Note that this is irreversible and incompatible with older versions of SVN.
The SVN server does not have to be upgraded for this, only the client.

Resources