WordPress theme update fails with ‘Could not remove the old theme..’

I finally got round to updating WordPress to version 3.4.2. This went smoothly. I then tried to update the Twenty Eleven and Twenty Ten themes to version 1.4 and was met with the following error:

An error occurred while updating Twenty Eleven: Could not remove the old theme..

A screenshot of the error is below:

We can see that the updates downloaded successfully so we know that the IIS worker process has write permissions. The updates failed at the ‘removing the old version of the theme stage’ which indicated that the IIS worker process did not have permissions to delete the \themes\twentyeleven folder.

A quick check confirmed this. So I added the modify permissions for the IIS worker process account to the themes folder:

I then re-ran the theme update process and it was successful because the IIS worker process was able to delete the older Twenty Eleven theme folder:

I now have up-to-date WordPress themes. The same principle applies for plugin updates – just modify the relevant plugin directory and give the IIS worker process modify permissions and updates will run successfully.

Removing Ghost NICs from a Virtual Machine after a P2V

When performing P2V (Physical to Virtual) migrations ‘old’ devices often remain hidden within Device Manager. They generally do not affect the Virtual Machine but can prevent you from assigning or changing IPs on the new vNICs (Virtual NICs). In Windows you will see the following:

The IP address XXX.XXX.XXX.XXX you have entered for this 
network adapter is already assigned to another adapter

To resolve this issue you will need to remove the Ghost or hidden NIC(s) on the system after which you will be able to assign IPs to a vNIC. Unfortunately these Ghost NICs are hidden so to make then visible perform the following steps:

1. Click Start > Run.
2. Type CMD in the Open dialogue box and hit enter.
3. At the command prompt, run this command:

set devmgr_show_nonpresent_devices=1

4. From within the same command prompt box run the following command:

start devmgmt.msc

5. This will load Device Manager. Ensure that you run both commands above in the same Command Prompt box as they must be run within the same environment for this whole process to work, per the screenshot below:

6. Once in Device Manager, click View > Show Hidden Devices:

7. Expand the Network Adapters tree (click the plus sign next to the Network Adapters entry) and you will see the old NICs which appear greyed out:

8. Right-click the old NIC(s), then click Uninstall.
9. Once all of the old NICs are uninstalled you will be able to assign IP addresses to the vNIC.

The steps above are also covered in VMware KB articles 2010145 and 1179.