WordPress upgrade

Error message:

wordpress update Could not create directory
This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

Solution:

#set persmissions for writing to all
find -type d -print0 | xargs -0 chmod 777
find -type f -print0 | xargs -0 chmod 666

#revert back
find -type d -print0 | xargs -0 sudo chown deploy
find -type f -print0 | xargs -0 sudo chown deploy

find -type d -print0 | xargs -0 chmod 755
find -type f -print0 | xargs -0 chmod 664

#set permissions to correct user
sudo chown deploy ./wp-includes/js/tinymce/plugins/wpemoji/*

Additional links

Microsoft azure – WordPress hosting tuning

How to configure rewrite rules:

It’s necessary to connect via FTP to azure VM and update ftp://host/site/wwwroot/web.config file.

<rewrite>
			<rules>
				<rule name="Rewrite tcS3_media">
					<match url="^tcS3_media/(.*)" />
					<action type="Redirect" url="http://downloads.vodnici.net/{R:1}" appendQueryString="false" redirectType="Permanent" />
				</rule>
			</rules>
		</rewrite>

How to migrate other blogs to WordPress on Azure

 Mass delete all images from media library

  • install SQL Executioner
  • run DELETE FROM `wp_posts` WHERE `post_type` = “attachment”