<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digging into WordPress &#187; Admin</title>
	<atom:link href="http://digwp.com/category/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://digwp.com</link>
	<description>Take your WordPress skills to the next level.</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:03:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Smarter Slugs ~!@$%^&amp;*()={}[]?</title>
		<link>http://digwp.com/2012/01/smarter-slugs/</link>
		<comments>http://digwp.com/2012/01/smarter-slugs/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 19:39:26 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=5620</guid>
		<description><![CDATA[See those crazy characters in the title of this post? Now see how they don&#8217;t appear in the post&#8217;s URL? That&#8217;s one of the finer details of the WordPress 3.3 update: smarter permalink slugs. So when you type something like you see in the title of this post, with all the funky characters, or even [...]]]></description>
			<content:encoded><![CDATA[<p>See those crazy characters in the title of this post? Now see how they <em>don&#8217;t</em> appear in the post&#8217;s URL? That&#8217;s one of the <em>finer details</em> of the WordPress 3.3 update: <strong>smarter permalink slugs</strong>.</p>
<p><span id="more-5620"></span></p>
<p>So when you type something like you see in the title of this post, with all the funky characters, or even just something like a comma, apostrophe, or semi-colon, WordPress 3.3+ works the magic and automatically creates your post slug without the junk. </p>
<h3>Details.</h3>
<p>It may not seem like a big deal, but previous versions of WordPress would include those funky characters when auto-creating your permalink slugs. If you glance at URLs while surfing around WordPress-powered sites, keep an eye on the URL in the address bar. It&#8217;s common to see all sorts of non-alphanumeric stuff in there.</p>
<p>Does it matter? I think so, for numerous reasons:</p>
<ul>
<li><strong>Readability, consistency</strong> &ndash; simple alphanumeric URLs work great everywhere, no need to clutter them up with redundant information. For example, funky characters can choke URL-shortening services. Also: fewer characters, facilitates better comprehension.</li>
<li><strong>Safer</strong> &ndash; certain characters such as <code>`</code>, <code>^</code>, <code>"</code>, <code>~</code>, <code>#</code>, <code>%</code>, <code>|</code>, <code>\</code>, <code>&lt;</code>, <code>&gt;</code>, <code>"</code>, <code>~</code>, <code>[</code>, <code>]</code>, <code>{</code>, <code>}</code>, and the blank space are considered as unsafe and should not be included in the URI (ie., always need encoded). Including them may seem to work, but you&#8217;re introducing sort of unknown variable into the mix, a potential vulnerability<a href="#ref" title="Jump to reference link">*</a></li>
<li><strong>SEO</strong> &mdash; do funky characters like blank spaces and percentage signs in the URL <em>hurt</em> your site&#8217;s SEO? Maybe not, but why put anything in there that <em>isn&#8217;t</em> a keyword?</li>
</ul>
<p>So smarter auto-slugs in WordPress 3.3, another one of the <em>finer details</em> that improves the overall WP post-editing experience, and something you may not have noticed.</p>
<h3>Bonus tip</h3>
<p>Another sort of related &ldquo;smarter-slugs&rdquo; feature noticed while looking into it, is the automatic removal of the &ldquo;-2&rdquo; that WordPress automatically appends to the post slug when a duplicate is detected. So for example, say you&#8217;re working on a new post:</p>
<ol>
<li>Create a post with a slug such as &ldquo;<code>test-post</code>&rdquo;</li>
<li>Delete the post and send to the Trash</li>
<li>Create another post with the same &ldquo;<code>test-post</code>&rdquo; slug</li>
<li>WordPress detects the duplicate post in the database and appends a &ldquo;-2&rdquo;, like so: <code>test-post-2</code> to the post slug</li>
<li>Create yet another post with the same slug and WordPress will append a &ldquo;-3&rdquo;, and so on..</li>
</ol>
<p>Nobody likes the &ldquo;dash-twos&rdquo; but they are required for the auto-creation of non-duplicate post slugs. What I just noticed with version 3.3 is that, once you empty the Trash, <strong>WordPress automagically removes the &ldquo;-2&rdquo; from the post slug</strong>, improving workflow to save you time. This may have changed in a previous version and I just hadn&#8217;t noticed, or it&#8217;s another one of the <em>administrative refinements</em> of WordPress 3.3.</p>
<p><strong>Update:</strong> it looks like the -2 removal only applies to <strong>drafts</strong> and <strong>pending</strong> posts, not to posts that have already been published.. (see <a href="#comment-32497">comment from Otto</a>)</p>
<p id="ref"><strong>*</strong> More info on <a href="http://perishablepress.com/press/2009/03/08/building-the-perishable-press-4g-blacklist/" title="Building the Perishable Press 4G Blacklist">forbidden characters and blocking them</a></p>
<hr />
<p><small>© 2012 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2012/01/smarter-slugs/">Permalink</a> | <a href="http://digwp.com/2012/01/smarter-slugs/#comments">14 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2012/01/smarter-slugs/&title=Smarter Slugs ~!@$%^&#038;*()={}<>[]?">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/permalink/" rel="tag">permalink</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2012/01/smarter-slugs/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Goodbye Admin Bar, Hello Toolbar</title>
		<link>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/</link>
		<comments>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 21:24:40 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[admin-bar]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=5574</guid>
		<description><![CDATA[When the Admin Bar hit the streets in WordPress 3.1, people seemed to either love it or hate it. And rightly so, it was a significant change in the appearance of the WP Admin area, and if not disabled in your User Profile, the front-end of your site as well. Many tips, tricks and plugins [...]]]></description>
			<content:encoded><![CDATA[<p>When the Admin Bar hit the streets in WordPress 3.1, people seemed to <a title="Poll: Love or Hate the WordPress Admin Bar" href="http://digwp.com/2011/04/poll-love-hate-admin-bar/">either love it or hate it</a>. And rightly so, it was a significant change in the appearance of the WP Admin area, and if not disabled in your <em>User Profile</em>, the front-end of your site as well. Many <a title="Admin Bar Tricks" href="http://digwp.com/2011/04/admin-bar-tricks/">tips, tricks and plugins for customizing the Admin Bar</a> began appearing around the Web. And then just as the dust began to settle, BAM — the &#8220;Admin Bar&#8221; transforms into the &#8220;Toolbar&#8221; with the <a href="http://wordpress.org/news/2011/12/sonny/">WordPress 3.3 update</a>.</p>
<p><span id="more-5574"></span></p>
<p>The WordPress 3.3 update focused heavily on streamlining and optimizing the Admin experience. The Admin Bar of WP 3.1 was intended as the &#8220;first step toward a front-end editor&#8221;. The original Admin Bar was debated for several good reasons:</p>
<ul>
<li>It&#8217;s enabled on the front-end by default</li>
<li>Gobbles up too much vertical screen space</li>
<li>It&#8217;s redundant, all links available elsewhere</li>
<li>It&#8217;s not visually appealing in general</li>
</ul>
<p>Using the <a title="Admin Bar Tricks" href="http://digwp.com/2011/04/admin-bar-tricks/">many Admin Bar tricks</a> that became available around the Web, WordPress users dealt with the thing in their own way and moved on with their lives. Some use plugins, some custom snippets &amp; scripts, some just love it as-is. But now with the new 3.3 update, the <strong>big question</strong> is &#8220;what works and what doesn&#8217;t?&#8221; We&#8217;re glad you asked..</p>
<h3>Admin Bar is dead, long live the Toolbar</h3>
<p>If you&#8217;ve updated to <a href="http://codex.wordpress.org/Version_3.3">WP 3.3</a>, you&#8217;ve seen the smaller &#8220;Toolbar&#8221; tucked neat above the Admin area. The new <span style="text-decoration: line-through;">Admin Bar</span> Toolbar seems to address <em>some</em> of the main concerns about the old Admin Bar:</p>
<ul>
<li>No longer enabled on front-end by default</li>
<li>Uses less vertical screen space</li>
<li>Integrates the Admin header area, so no longer redundant</li>
<li>It looks a little better (in my opinion)</li>
</ul>
<p>For those who have not yet updated or have no idea what&#8217;s going on, here is a visual comparison of the old &#8220;Admin Bar&#8221; and the new &#8220;Toolbar&#8221;:</p>
<p><img src="http://digwp.com/wp-content/blog-images/wp-admin-bar-01.jpg" alt="[ The 'old' WP Admin Bar ]" /><br />
<small><em>Admin Bar: bigger, clunkier, and redundant</em></small></p>
<p><img src="http://digwp.com/wp-content/blog-images/wordpress-toolbar-01.jpg" alt="[ The 'new' WP Toolbar ]" /><br />
<small><em>Toolbar: smaller, simpler, and required</em></small></p>
<p>The new Toolbar certainly looks better, but <a title="WP Forum &gt; Hiding admin bar in WordPress 3.3" href="http://wordpress.org/support/topic/hiding-admin-bar-in-wordpress-33">concerns remain</a>. From what I&#8217;ve gathered, the main gripe is that the Toolbar is <em>mandatory</em>, and possibly still redundant, depending on site setup and configuration (plugins, networks, etc.). Is it really <em>mandatory</em>? That sounds silly to me, but seems to be the case:</p>
<p><img src="http://digwp.com/wp-content/blog-images/wp-admin-bar.jpg" alt="[ The 'old' WP Admin Bar ]" /><br />
<small><em>User Profile settings for the old Admin Bar: full control</em></small></p>
<p><img src="http://digwp.com/wp-content/blog-images/wordpress-toolbar.jpg" alt="[ The 'new' WP Toolbar ]" /><br />
<small><em>User Profile settings for the Toolbar: bamboozled! No option to disable for back-end</em></small></p>
<p>So yeah, <em>something changed</em>, so the question for the Admin Toolbar is “<strong>what works and what doesn&#8217;t?</strong>” Let&#8217;s dig in and see what&#8217;s up..</p>
<h3>Admin Bar changes, now WP Toolbar</h3>
<p>As <a href="http://wordpress.org/support/topic/hiding-admin-bar-in-wordpress-33#post-2495448">Ipstenu puts it</a>: &#8220;You don&#8217;t have to like it, but it&#8217;s here to stay.&#8221; So it&#8217;s time to look at things practically and get on with it. First of all, if you have a plugin or functions script that hides, removes, or customizes the Admin Bar, definitely investigate to see if everything is still working according to plan.</p>
<h4>What works..</h4>
<p>After some testing, we&#8217;ve seen the following <code>functions.php</code> snippets continue to work in WordPress version 3.3:</p>
<pre><code>// disable the admin bar (front end only) show_admin_bar(false); // disable the admin bar (front end only) add_filter('show_admin_bar', '__return_false');</code></pre>
<p>In WP 3.1, these functions hid the Admin Bar on <em>both sides</em> of the fence — front end &amp; back end. In WP 3.3+, these snippets will hide the Admin Toolbar <strong>only on the front-end</strong> of your site (the public side). Likewise, this snippet of CSS added to your theme&#8217;s <code>style.css</code> file <em>hides</em> the Toolbar on the <em>front-end</em>:</p>
<pre><code>/* hide the admin bar (front end only) */ #wpadminbar { display:none; }</code></pre>
<p>Keep in mind that, when using the CSS method, the Toolbar markup is still present in the source code, but will not be displayed in the browser.</p>
<p>Here is another useful snippet for disabling the Toolbar for lesser users:</p>
<pre><code>// show admin bar only for admins if (!current_user_can('manage_options')) { add_filter('show_admin_bar', '__return_false'); } // show admin bar only for admins and editors if (!current_user_can('edit_posts')) { add_filter('show_admin_bar', '__return_false'); }</code></pre>
<p>Note that this also only applies to Toolbar display on the front-end.</p>
<h4>What doesn&#8217;t work..</h4>
<p>Basically the <code>show_admin_bar()</code> function seems to work as it did before version 3.3, except that now the Toolbar is integral to the Admin area, so disabling it using the previous functions works only on the front-end of your site. So tricks like this stopped working:</p>
<pre></pre>
<p>If you&#8217;re running WP 3.1+ or 3.2+ (not 3.3+), then <code>show_admin_bar()</code> will continue to disable the Admin Bar on both front and back ends of WordPress.</p>
<h3>Admin Bar plugins</h3>
<p>In our <a href="http://digwp.com/">book</a>, we provide a list of plugins to help with customizing the 3.1 Admin Bar. Now working on the <a href="http://digwp.com/2011/12/poll-results-book-news-and-more/">DiW 3.3 update</a>, it&#8217;s time to check these plugins for compatibility with <strong>WordPress 3.3</strong>. Here are the results:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/admin-bar/">Admin Bar Remover</a> — disables Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/wp-admin-bar-removal/">Admin Bar Removal</a> — doesn&#8217;t work in WP 3.3+</li>
<li><a href="http://wordpress.org/extend/plugins/admin-bar-disabler/">Admin Bar Disabler</a> — disables Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/admin-bar-minimiser/">Admin Bar Minimiser</a> — hides/minimizes Toolbar on both sides of WP 3.3, but looks weird because of the existing Admin design. Also, in the Admin the hover/toggle button is <a href="http://digwp.com/wp-content/blog-images/wordpress-toolbar-02.jpg">invisible</a>.</li>
<li><a href="http://wordpress.org/extend/plugins/global-admin-bar-hide-or-remove/">Global Hide/Remove Admin Bar Plugin</a> — removes the User Profile Toolbar settings and removes Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/hide-admin-bar-search/">Hide Admin Bar Search</a> — there is no search bar in WP 3.3</li>
<li><a href="http://wordpress.org/extend/plugins/stick-admin-bar-to-bottom/">Stick Admin Bar To Bottom</a> — works great on both sides of WP 3.3</li>
<li><a href="http://wordpress.org/extend/plugins/wp-custom-admin-bar/">WP Custom Admin Bar</a> — didn&#8217;t seem to work..</li>
<li><a href="http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/">Always show admin bar</a> — works in 3.3 but applies only to front-end</li>
<li><strong>Update:</strong> <a href="http://wordpress.org/extend/plugins/ultimate-admin-bar/">Ultimate Admin Bar</a> — puts it <em>all</em> in the Toolbar to further optimize your workflow</li>
</ul>
<p>If you know of others, shout em out and I&#8217;ll update the post.</p>
<h3>To be continued..</h3>
<p>Without a doubt things will continue to change, and it&#8217;ll be fun watching as WordPress continues to evolve, Toolbar and all :)</p>
<hr />
<p><small>© 2012 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/">Permalink</a> | <a href="http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/#comments">16 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/&title=Goodbye Admin Bar, Hello Toolbar">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/admin/" rel="tag">Admin</a>, <a href="http://digwp.com/tag/admin-bar/" rel="tag">admin-bar</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Clean Up Weird Characters in Database</title>
		<link>http://digwp.com/2011/07/clean-up-weird-characters-in-database/</link>
		<comments>http://digwp.com/2011/07/clean-up-weird-characters-in-database/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 18:31:45 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=4940</guid>
		<description><![CDATA[It&#8217;s been a crazy month, with lots of drama all over the place. Here at DigWP.com, we had an episode where the site was all screwed up and not loading or only partially loading, blank white pages, and the whole bit. During the process of keeping it together and trying to restore full functionality, numerous [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a crazy month, with lots of drama all over the place. Here at <a href="http://digwp.com/" title="Digging into WordPress">DigWP.com</a>, we had <a href="http://digwp.com/2011/06/dont-use-postname/" title="Clean Up Weird Characters in Database">an episode</a> where the site was all screwed up and not loading or only partially loading, blank white pages, and the whole bit. During the process of keeping it together and trying to restore full functionality, numerous database imports and exports were performed under a variety of circumstance. During the rush, apparently the most recent database backup file was somehow uncompressed outside of MySQL before final import. Several days later, that decompression/unzipping basically converted every quotation mark, em dash, en dash, ellipses and other special characters into some really ugly-looking codes.</p>
<p><span id="more-4940"></span></p>
<p><img src="http://digwp.com/wp-content/blog-images/weird-characters.png" alt="[ Weird Characters ]" /></p>
<h3>What are they?</h3>
<p>I <em>think</em> what happened is that the restoration database that we ended up using had been opened in a file/text editor. It&#8217;s just a guess, and sort of irrelevant, but the text editor converted our <abbr title="Universal Transformation Format-8 (character encoding)">UTF-8</abbr> characters into some other character set, like <abbr title="International Organization for Standardization (8859-1)">ISO-8859-1</abbr>. So after restoration, we ended up with hundreds of these weird characters in the database &ndash; quotes, hyphens, dashes, and ellipses were all converted to Klingon:</p>
<pre><code>â€œ = left quote = “
â€ = right quote = ”

â€˜ = left single quote = ‘
â€™ = right single quote = ’

â€” = en dash = –
â€“ = em dash = —

â€¢ = hyphen = -
â€¦ = ellipsis = …</code></pre>
<p>Identifying most of these characters was relatively painless, but the en-dash and em-dash characters may be reversed (i.e., <code>â€“</code> = em dash, and <code>â€”</code> = en dash). Testing the other character replacements in the database was easy, but discerning between instances of em &amp; en dashes proved futile. So do your own testing and make good backups before making any mass changes. Hopefully someone can help us out with more of the specifics.</p>
<h3>Clean &lsquo;em up</h3>
<p>Before making any changes to your database, make sure you have a good backup (or three). Then to clean up these weird characters from the WordPress database, use a program like <a href="http://www.phpmyadmin.net/">phpMyAdmin</a> to execute the following queries.</p>
<h4>Clean up post_content</h3>
<pre><code>UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€œ', '“');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€', '”');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€™', '’');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€˜', '‘');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€”', '–');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€“', '—');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€¢', '-');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€¦', '…');</code></pre>
<h4>Clean up comment_content</h3>
<pre><code>UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€œ', '“');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€', '”');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€™', '’');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€˜', '‘');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€”', '–');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€“', '—');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€¢', '-');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€¦', '…');</code></pre>
<h4>Other tables</h3>
<p>While cleaning up the DigWP database, several other weird characters also showed up in various places, but they were very few in number. I also noticed several instances of converted quotes, dashes, and hyphens scattered around in some other tables, mostly in the <code>options</code> table, buried deep within temporary <code>rss_</code> data. So I didn&#8217;t bother with anything beyond the <code>post_content</code> and <code>comment_content</code> tables, but easily could have done so by modifying the previous queries like so:</p>
<p><code>UPDATE [table_name] SET [col_name] = REPLACE([col_name], 'â€¦', '…');</code></p>
<p>Just replace <code>[table_name]</code> with whatever table you want to clean up, <code>col_name</code> with the column name, and then replicate or edit the query with the proper character replacements.</p>
<h3>Lesson learned</h3>
<p>Take-home message: don&#8217;t open your database in a text editor. But if you do, execute these SQL queries for easy clean-up.</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/07/clean-up-weird-characters-in-database/">Permalink</a> | <a href="http://digwp.com/2011/07/clean-up-weird-characters-in-database/#comments">20 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/07/clean-up-weird-characters-in-database/&title=Clean Up Weird Characters in Database">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/database/" rel="tag">database</a>, <a href="http://digwp.com/tag/mysql/" rel="tag">mysql</a>, <a href="http://digwp.com/tag/sql/" rel="tag">sql</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/07/clean-up-weird-characters-in-database/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Leave the Visual Editor ON</title>
		<link>http://digwp.com/2011/05/visual-editor-on/</link>
		<comments>http://digwp.com/2011/05/visual-editor-on/#comments</comments>
		<pubDate>Mon, 23 May 2011 17:56:23 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[editor]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=3867</guid>
		<description><![CDATA[Just a quick reminder to anyone out there that may not know.. Enabling the Visual Editor in your User Profile settings gets you access to both Visual and HTML editors in the Write/Edit Post screen. Just click on either tab above the toolbar to toggle between modes. So you can write your posts in HTML [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder to anyone out there that may not know.. <strong>Enabling the Visual Editor</strong> in your User Profile settings gets you access to both Visual and HTML editors in the Write/Edit Post screen. Just click on either tab above the toolbar to toggle between modes. So you can write your posts in HTML and then jump into the Visual Editor to take advantage of the <strong>new Linking tool</strong>, which makes adding links incredibly easy.</p>
<p><span id="more-3867"></span></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-06.gif" alt="[ WP 3 Linking Tool ]" /></p>
<p>In previous versions of WordPress, if you enabled the Visual Editor via your User Profile page, that&#8217;s pretty much what you were forced to use. There was no way to leave it enabled and then just choose your preference locally from the Write/Edit post screen, so every time you updated your post, the editor would switch back to visual mode &ndash; even if you repeatedly click the HTML editing-mode button. Older versions of WordPress were like this for quite awhile, and during that time many WP peeps just decided to disable the Visual Editor to avoid the headache and constant switching.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-05.gif" alt="[ WP 2.3.3 - User Profile Page ]" /></p>
<p>Above is a screenshot of the User Profile page of version 2.3.3. At some point, it switched from &#8220;disabled&#8221; to &#8220;enabled&#8221;, as shown below for WordPress version 3.1.2:</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-07.gif" alt="[ WP 3.1.2 - User Profile Page ]" /></p>
<p>Fast-forward to WordPress 3, and welcome the new streamlined <strong>Linking Tool</strong> that <em>only works in visual-editing mode</em>. It&#8217;s an awesome tool that makes internal linking almost fun, but unfortunately it is <strong>not available with the HTML editor</strong>. So all of those seasoned WP users who&#8217;ve been conditioned to disable the Visual Editor during setup are now completely missing out on the awesomeness of the new Link Tool.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-01.gif" alt="" /></p>
<p>I don&#8217;t know when it happened (which version), but somewhere along the way, WordPress started <em>remembering your editing preferences</em> right there in the Write/Edit post screen, so it&#8217;s no longer necessary to &#8220;Disable the Visual Editor&#8221; next time you&#8217;re setting up a site. Sure you can still disable it if you want to, but why? Leaving it enabled <em>gives you the option</em> to choose which editor to use while actually writing your post. This gives you access to WordPress&#8217; new Link Tool without sacrificing your ability to compose in HTML mode.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-02.gif" alt="" /></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-03.gif" alt="" /></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-04.gif" alt="" /></p>
<p>Then again, I may be totally wrong and everyone already knows about this. I hope that&#8217;s the case, because the new Link tool is super useful and worth a quick jump into the Visual Editor.</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/05/visual-editor-on/">Permalink</a> | <a href="http://digwp.com/2011/05/visual-editor-on/#comments">16 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/05/visual-editor-on/&title=Leave the Visual Editor ON">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/admin/" rel="tag">Admin</a>, <a href="http://digwp.com/tag/editing/" rel="tag">editing</a>, <a href="http://digwp.com/tag/editor/" rel="tag">editor</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/05/visual-editor-on/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Poll: Best Caching Plugin for WordPress?</title>
		<link>http://digwp.com/2011/05/best-caching-plugin-wordpress/</link>
		<comments>http://digwp.com/2011/05/best-caching-plugin-wordpress/#comments</comments>
		<pubDate>Mon, 16 May 2011 21:50:34 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[polls]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=1817</guid>
		<description><![CDATA[New Poll! We&#8217;ve got several polls running in the sidebar at DigWP.com, and the latest asks which caching plugin is best. Sure it&#8217;s all anecdotal and subjective, but user feedback is a fun way to see trends and get an idea of the top plugins. Amazingly enough, there currently are over 1,000 plugins tagged as [...]]]></description>
			<content:encoded><![CDATA[<p>New Poll! We&#8217;ve got several <em>polls running in the sidebar</em> at <a href="http://digwp.com/">DigWP.com</a>, and the latest asks <strong>which caching plugin is best</strong>. Sure it&#8217;s all anecdotal and subjective, but user feedback is a fun way to see trends and get an idea of the top plugins.</p>
<p><span id="more-1817"></span></p>
<p>Amazingly enough, there currently are <em>over 1,000 plugins</em> tagged as <a href="http://wordpress.org/extend/plugins/search.php?q=cache" title="Plugins tagged as 'cache' at WordPress.org">cache</a> at the WordPress Plugin Directory. That&#8217;s a <em>mind-boggling</em> number, so for this poll we&rsquo;re focusing only on caching plugins that improve <em>overall site performance</em> (as opposed to plugins specifically for caching images, feeds, stylesheets, and everything else). If you have a favorite that isn&rsquo;t on the list, leave a comment and we&rsquo;ll mention it when we post the results.</p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p>Check the sidebar for more WordPress polls! :)</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/05/best-caching-plugin-wordpress/">Permalink</a> | <a href="http://digwp.com/2011/05/best-caching-plugin-wordpress/#comments">43 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/05/best-caching-plugin-wordpress/&title=Poll: Best Caching Plugin for WordPress?">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/polls/" rel="tag">polls</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/05/best-caching-plugin-wordpress/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Admin Bar Tricks</title>
		<link>http://digwp.com/2011/04/admin-bar-tricks/</link>
		<comments>http://digwp.com/2011/04/admin-bar-tricks/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 16:20:23 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[admin-bar]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=4020</guid>
		<description><![CDATA[According to our latest poll, so far the votes are pretty much split on whether people love, hate, or don&#8217;t care about WordPress&#8217; new Admin Bar. Over time, it looks like &#8220;Hate it&#8221; has started to pull ahead, but it doesn&#8217;t matter because the Admin Bar is here to stay, regardless of opinion. Already there [...]]]></description>
			<content:encoded><![CDATA[<p>According to our <a href="http://digwp.com/2011/04/poll-love-hate-admin-bar/" title="Poll: Love or Hate the WordPress Admin Bar">latest poll</a>, so far the votes are pretty much split on whether people <em>love</em>, <em>hate</em>, or <em>don&#8217;t care</em> about WordPress&#8217; new Admin Bar. Over time, it looks like &#8220;Hate it&#8221; has started to pull ahead, but it doesn&#8217;t matter because <strong>the Admin Bar is here to stay</strong>, regardless of opinion. Already there are many awesome ways to make it do virtually <em>whatever you want</em>. In this <abbr title="Digging into WordPress">DigWP</abbr> post, we round up a ton of tips, tricks, and plugins for ultimately mastering the WordPress Admin Bar.</p>
<p><span id="more-4020"></span></p>
<p>Here is our menu of <strong>Admin Bar Tricks</strong> for WordPress 3.1 and better:</p>
<ul>
<li><a href="#disable-for-users">Disable the Admin Bar for individual users</a></li>
<li><a href="#disable-for-theme">Disable the Admin Bar for all users of the current theme</a></li>
<li><a href="#disable-for-non-admins">Disable the Admin Bar for non-Admins only</a></li>
<li><a href="#always-show">Always show the Admin Bar</a></li>
<li><a href="#move-to-bottom">Move the Admin Bar to the bottom</a></li>
<li><a href="#add-remove-links">Add or Remove links from the Admin Bar</a></li>
<li><a href="#clean-profile">Clean up User Profile Page</a></li>
<li><a href="#admin-bar-plugins">Disable and Customize the Admin Bar with Plugins</a></li>
<li><a href="#admin-bar-resources">Even More Admin Bar Resources</a></li>
</ul>
<h3 id="disable-for-users">Disable the Admin Bar for individual users</h3>
<p>By default, each registered user has the option of showing the Admin on the frontend and/or back-end of the site. Thus, to change your preferences, just visit <strong>Users</strong> &gt; <strong>Your Profile</strong> and choose your options as seen here:</p>
<p><img src="http://digwp.com/wp-content/blog-images/admin-bar-settings.gif" alt="[ Screenshot: Admin Bar Settings ]" /></p>
<p>Unfortunately, this gets kind of tedious when customizing profiles for many users. Fortunately, we&#8217;re just getting started, so read ahead to see more efficient ways of disabling and modifying the WordPress Admin Bar.</p>
<h3 id="disable-for-theme">Disable the Admin Bar for all users of the current theme</h3>
<p>To cleanly disable the Admin Bar for all users of your theme (and thus your site), add this snippet to your theme’s <code>functions.php</code> file:</p>
<pre><code>// disable the admin bar
show_admin_bar(false);</code></pre>
<p>Alternately, you may use this method, which filters the <code>show_admin_bar</code> function:</p>
<pre><code>// disable the admin bar
add_filter('show_admin_bar', '__return_false');</code></pre>
<p>Another option is to hide the Admin Bar using <abbr title="Cascading Style Sheets">CSS</abbr>. To do so, paste this into your<br />
theme’s <code>style.css</code> (or other stylesheet):</p>
<pre><code>/* hide the admin bar */
#wpadminbar { display:none; }</code></pre>
<h3 id="disable-for-non-admins">Disable the Admin Bar for non-Admins only</h3>
<p>Expanding on the previous example, here are two snippets that disable the Admin Bar for non-Admins and Editors. Place either of the following in <code>functions.php</code>:</p>
<pre><code>// show admin bar only for admins
if (!current_user_can('manage_options')) {
	add_filter('show_admin_bar', '__return_false');
}
// show admin bar only for admins and editors
if (!current_user_can('edit_posts')) {
	add_filter('show_admin_bar', '__return_false');
}</code></pre>
<p>As you might guess, any setting may be used for <code>current_user_can()</code>, so it’s easy to show/hide the Admin Bar for any particular group of users.</p>
<h3 id="clean-profile">Clean up User Profile Page</h3>
<p>After disabling the Admin Bar, you may want to hide its display settings in each user’s Profile Page. The easiest way to do this is with a simple function:</p>
<pre><code>function hideAdminBar() { ?&gt;
&lt;style type="text/css"&gt;.show-admin-bar { display: none; }&lt;/style&gt;
&lt;?php }
add_action('admin_print_scripts-profile.php', 'hideAdminBar');</code></pre>
<p>Just place that in your theme&#8217;s <code>functions.php</code> and you&#8217;re good to go. No more Admin Bar Settings displayed in the Admin area.</p>
<h3 id="always-show">Always show the Admin Bar</h3>
<p><a href="http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/" title="Always show admin bar">Follow the white rabbit</a> shows us how to show the Admin Bar even when logged out. As a bonus, a handy &#8220;Log in&#8221; button is added to the bar for easy maneuvering. Just add the following snippet to your theme&#8217;s <code>functions.php</code> file:</p>
<pre><code>// always show admin bar
function pjw_login_adminbar( $wp_admin_bar) {
	if ( !is_user_logged_in() )
	$wp_admin_bar-&gt;add_menu( array( 'title' =&gt; __( 'Log In' ), 'href' =&gt; wp_login_url() ) );
}
add_action( 'admin_bar_menu', 'pjw_login_adminbar' );
add_filter( 'show_admin_bar', '__return_true' , 1000 );</code></pre>
<p>You can see it in action at <a href="http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/" title="Always show admin bar">follow the white rabbit</a>.</p>
<h3 id="move-to-bottom">Move the Admin Bar to the bottom</h3>
<p>Want to display the Admin Bar at the bottom of the page instead of the top? <a href="http://wpengineer.com/2190/move-wordpress-admin-bar-to-the-bottom/" title="Move WordPress Admin Bar to the Bottom">WPengineer</a> shows us how with this bit of <abbr title="Cascading Style Sheets">CSS</abbr> via the <code>functions.php</code> file:</p>
<pre><code>// move admin bar to bottom
function fb_move_admin_bar() { ?&gt;
	&lt;style type="text/css"&gt;
		body {
			margin-top: -28px;
			padding-bottom: 28px;
		}
		body.admin-bar #wphead {
			padding-top: 0;
		}
		body.admin-bar #footer {
			padding-bottom: 28px;
		}
		#wpadminbar {
			top: auto !important;
			bottom: 0;
		}
		#wpadminbar .quicklinks .menupop ul {
			bottom: 28px;
		}
	&lt;/style&gt;
&lt;?php }
// on backend area
add_action( 'admin_head', 'fb_move_admin_bar' );
// on frontend area
add_action( 'wp_head', 'fb_move_admin_bar' );</code></pre>
<p>This code adds the required CSS to both the front-end (public pages) and back-end (admin pages). To disable for one or the other, just comment-out or remove the corresponding <code>add_action()</code> line near the end of the code. You could also just copy/paste the CSS into your theme&#8217;s <code>style.css</code> file if you only need to move it on the front-end of your site. An even easier way is provided by Coen Jacobs&#8217; <a href="http://cnjcbs.com/wordpress-plugins/stick-admin-bar-to-bottom/">Stick Admin Bar To Bottom</a> plugin that makes it happen automagically.</p>
<h3 id="add-remove-links">Add or Remove links from the Admin Bar</h3>
<p><a href="http://wpmu.org/how-to-add-or-remove-links-from-the-wordpress-3-1-admin-bar/" title="How to Add or Remove Links From the WordPress 3.1 Admin Bar">WPMU.org</a> shows us how to add/remove links from the Admin Bar. This is especially useful for MultiSite networks, where all of the extra links may not be necessary. The following code may be used to <strong>remove</strong> links and/or menus (via <code>functions.php</code>:</p>
<pre><code>// remove links/menus from the admin bar
function mytheme_admin_bar_render() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu('comments');
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );</code></pre>
<p>For this example, we use <code>remove_menu('comments')</code> to remove the comments dropdown list. To remove a different link/menu, check <code>/wp-includes/admin-bar.php</code> for the corresponding ID. Here&#8217;s a list of some of them to get you started:</p>
<ul>
<li><code>my-account</code> &ndash; link to your account (avatars disabled)</li>
<li><code>my-account-with-avatar</code> &ndash; link to your account (avatars enabled)</li>
<li><code>my-blogs</code> &ndash; the &#8220;My Sites&#8221; menu if the user has more than one site</li>
<li><code>get-shortlink</code> &ndash; provides a Shortlink to that page</li>
<li><code>edit</code> &ndash; link to the Edit/Write-Post page</li>
<li><code>new-content</code> &ndash; link to the &#8220;Add New&#8221; dropdown list</li>
<li><code>comments</code> &ndash; link to  the &#8220;Comments&#8221; dropdown</li>
<li><code>appearance</code> &ndash; link to the &#8220;Appearance&#8221; dropdown</li>
<li><code>updates</code> &ndash; the &#8220;Updates&#8221; dropdown</li>
</ul>
<p>To <strong>add</strong> links/menus to the Admin Bar, add the following code to your <code>functions.php</code> file:</p>
<pre><code>// add links/menus to the admin bar
function mytheme_admin_bar_render() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;add_menu( array(
		'parent' =&gt; 'new-content', // use 'false' for a root menu, or pass the ID of the parent menu
		'id' =&gt; 'new_media', // link ID, defaults to a sanitized title value
		'title' =&gt; __('Media'), // link title
		'href' =&gt; admin_url( 'media-new.php') // name of file
		'meta' =&gt; false // array of any of the following options: array( 'html' =&gt; '', 'class' =&gt; '', 'onclick' =&gt; '', target =&gt; '', title =&gt; '' );
	));
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );</code></pre>
<p>You&#8217;ll want to adjust the parameters to fit your needs, and don&#8217;t forget to see the <a href="http://codex.wordpress.org/Function_Reference/add_menu" title="WP Codex: Function Reference/add menu">Codex</a> for additional information. For even more insight into this technique, see WPengineer&#8217;s post on <a href="http://wpengineer.com/2113/add-menus-to-the-admin-bar-of-wordpress/">adding menus to the Admin Bar</a>.</p>
<h3 id="admin-bar-plugins">Disable and Customize the Admin Bar with Plugins</h3>
<p>Almost immediately after the Admin Bar was added to the WordPress core, plugins started popping up to disable it, move it, minimize it, and more. Here’s a quick list of plugins and links for ultimate control over the Admin Bar.</p>
<ul>
<li><a href="http://digwp.com/u/542">Admin Bar Disabler</a></li>
<li><a href="http://digwp.com/u/543">Admin Bar Minimiser</a></li>
<li><a href="http://digwp.com/u/544">Admin Bar Removal</a></li>
<li><a href="http://digwp.com/u/545">Global Hide/Remove Admin Bar Plugin</a></li>
<li><a href="http://digwp.com/u/546">Hide Admin Bar Search</a></li>
<li><a href="http://digwp.com/u/547">Stick Admin Bar To Bottom</a></li>
<li><a href="http://digwp.com/u/548">WP Custom Admin Bar</a></li>
</ul>
<p>If you know of others, mention them in the comments and we&#8217;ll add them to the list!</p>
<h3 id="admin-bar-resources">More Admin-Bar Resources</h3>
<p>Here are some excellent resources for more information on the WordPress Admin Bar.</p>
<ul>
<li><a href="http://codex.wordpress.org/Administration_Menus">WP Codex: Administration Menus</a></li>
<li><a href="http://codex.wordpress.org/Function_Reference/add_menu" title="WP Codex: Function Reference/add menu">WP Codex: Function Reference/add menu</a></li>
<li><a href="http://yoast.com/disable-wp-admin-bar/">How to disable the WordPress Admin Bar</a></li>
<li><a href="http://www.wpbeginner.com/wp-tutorials/what-everybody-ought-to-know-about-the-wordpress-admin-bar/">What Everybody Ought to Know about the WordPress Admin Bar</a></li>
</ul>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/04/admin-bar-tricks/">Permalink</a> | <a href="http://digwp.com/2011/04/admin-bar-tricks/#comments">20 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/04/admin-bar-tricks/&title=Admin Bar Tricks">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/admin/" rel="tag">Admin</a>, <a href="http://digwp.com/tag/admin-bar/" rel="tag">admin-bar</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/04/admin-bar-tricks/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>What to do when Auto-Update Fails</title>
		<link>http://digwp.com/2011/04/wordpress-auto-updates/</link>
		<comments>http://digwp.com/2011/04/wordpress-auto-updates/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 15:42:17 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Upgrade]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=4023</guid>
		<description><![CDATA[Ahh yeah, WordPress just rolled out another update to version 3.1.1. If you&#8217;re able to upgrade via the Admin, updating your site(s) should be a piece of cake: just log in, click a few buttons, wait a few minutes, and done. The convenience of automatically updating the WordPress core, plugins, and themes is awesome, but [...]]]></description>
			<content:encoded><![CDATA[<p>Ahh yeah, WordPress just rolled out another update to version 3.1.1. If you&#8217;re able to upgrade via the Admin, updating your site(s) should be a piece of cake: just log in, click a few buttons, wait a few minutes, and done. The convenience of automatically updating the WordPress core, plugins, and themes is awesome, but things can go wrong once in awhile and auto-updates can fail. If this happens, getting back on track is a bit tricky, so here&#8217;s a quick guide to help restore site functionality and ensure a proper update.</p>
<p><span id="more-4023"></span></p>
<h3>What an auto-update failure looks like</h3>
<p>After initiating the auto-update of the WordPress core (say, from 3.1.0 to 3.1.1), the &#8220;Update WordPress&#8221; screen will begin displaying the status of each step, beginning with these messages:</p>
<ul>
<li>Downloading update from <code>http://wordpress.org/wordpress-3.1.1.zip</code>&#8230;</li>
<li>Unpacking the update&#8230;</li>
<li>Verifying the unpacked files&#8230;</li>
<li>Installing the latest version&#8230;</li>
</ul>
<p>So far so good, but even if it gets that far, there&#8217;s still a chance of failure, as seen in this recent screenshot:</p>
<p><img src="http://digwp.com/wp-content/blog-images/auto-update-fail.gif" alt="[ Screenshot: Auto-Update Failure ]" /></p>
<p>The status message that appears just before &#8220;Installation Failed&#8221; explains what WordPress <em>thinks</em> is the issue, but there are cases where things go wrong and <em>no messages are displayed</em>. In either case, the user can get <strong>locked out</strong> of the site. When this happens, trying to load any of your pages &ndash; admin, blog, login, etc. &ndash; gets you the nothing but the <strong>WordPress maintenance page</strong>:</p>
<blockquote><p>Briefly unavailable for scheduled maintenance.<br />Check back in a minute.</p></blockquote>
<p>Very frustrating, and very difficult to fix things when you can&#8217;t log in to Admin. Fortunately, you don&#8217;t need Admin to fix it and get back in. Just FTP your way to the root directory and <strong>delete</strong> the <code>.maintenance</code> file. The name begins with a dot, so if you don&#8217;t see it using your FTP program, try logging into your server&#8217;s control panel and using the file manager to find and delete. Here is a screenshot showing the <code>.maintenance</code> file in the root installation directory:</p>
<p><img src="http://digwp.com/wp-content/blog-images/auto-update-file.gif" alt="[ Screenshot: The '.maintenance' File ]" /></p>
<p>This file contains a variable that is used by the <code>wp_maintenance</code> function. It looks like this: </p>
<p><code>&lt;?php $upgrading = 1302115706; ?&gt;</code></p>
<p>If you get locked out of your site, deleting the <code>.maintenance</code> file will fix the issue and get you back into Admin and other areas of your site. Once there, WordPress may remind you of the recent update failure by displaying the following message:</p>
<blockquote><p>An automated WordPress update has failed to complete &#8211; please attempt the update again now.</p></blockquote>
<p><img src="http://digwp.com/wp-content/blog-images/auto-update-fail-message.gif" alt="[ Screenshot: Auto-Update 'Fail' Message ]" /></p>
<p>At this point, you have (at least) two choices: keep trying with auto-updates or download the latest version and upload manually. Even if you decide to upgrade manually, you may want to resolve the issue and get auto-updates working for future versions.</p>
<h3>Check File Permissions</h3>
<p>Proper file permissions are the <strong>key</strong> to smooth auto-<em>anything</em>. On the Codex Page for the <a href="http://codex.wordpress.org/Dashboard_Updates_SubPanel#Troubleshooting">Dashboard Updates SubPanel</a>, the <strong>Troubleshooting</strong> section advises the following:</p>
<blockquote><p>Make sure that your entire wordpress directory is owned by the username under which your Apache server runs. For example, if your server runs as https, and your files live in /var/wordpress do a &#8220;chown -R apache.apache /var/wordpress.&#8221;</p></blockquote>
<p>In addition to this advice, you may also try changing the permissions of your <code>/upgrade/</code> directory. As seen in the following screenshot, WordPress uses the <code>/upgrade/</code> directory for a temporary file used during the installation process:</p>
<p><img src="http://digwp.com/wp-content/blog-images/auto-update-tmp.gif" alt="[ Screenshot: Upgrade Folder with Temp WP File ]" /></p>
<p>For the temporary WordPress file to be created, the <code>/upgrade/</code> directory needs to be writable by the server. To see if this is the issue, try setting the directory permissions to <code>777</code> (or CHMOD equivalent) and trying the auto-update again. If it works, you&#8217;ve resolved the issue, but you should always use the most restrictive permissions possible. This may take some research, experimenting, and/or a Help ticket with your host, but once you get it, you&#8217;re all set for auto-updates. Here is an <a href="http://www.onlineconversion.com/html_chmod_calculator.htm">Online CHMOD Calculator</a> to help with the conversion process.</p>
<h3>Turn Off Safe Mode</h3>
<p>If possible, disabling <a href="http://php.net/manual/en/features.safe-mode.php" title="PHP Safe Mode">Safe Mode</a> may help to get auto-updates working again. According to the PHP Manual, Safe Mode is deprecated as of PHP version 5.3.0:</p>
<blockquote><p>This feature has been DEPRECATED as of PHP 5.3.0.<br />Relying on this feature is highly discouraged.</p></blockquote>
<p>Disabling Safe Mode is done in a variety of ways. If disabling through your server&#8217;s control panel isn&#8217;t possible, you can use this snippet in your <code>php.ini</code> file:</p>
<pre><code>safe_mode = Off</code></pre>
<p>Or this snippet in your Apache configuration file:</p>
<pre><code>&lt;Directory /var/www/public&gt;
 php_admin_flag safe_mode off
&lt;/Directory&gt;</code></pre>
<p>Just add that code to your <code>httpd.conf</code> file and restart Apache.</p>
<h3>Define FTP Variables in wp-config.php</h3>
<p><a href="http://digwp.com/2010/11/ftp-in-wpconfig/" title="Putting FTP Info in wp-config.php to Ease Updates">As discussed</a>, another way to get auto-updates working is to define the requisite variables in your <a href="http://digwp.com/2010/08/pimp-your-wp-config-php/" title="Pimp your wp-config.php">wp-config.php file</a>. There are <a href="http://wordpress.org/support/topic/upgrade-tries-to-write-to-root" title="WP Forums: Upgrade tries to write to root">numerous</a> <a href="http://wordpress.org/support/topic/download-failed-could-not-create-temporary-file" title="WP Forums: Download failed.: Could not create Temporary file">variations</a> on this technique, so you&#8217;ll need to do your own experimentation to get a set of definitions that work for your situation. Here is what works for me on Media Temple&#8217;s (dv) server:</p>
<pre><code>define('FS_CHMOD_FILE', 0755);
define('FS_CHMOD_DIR', 0755);
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/httpdocs/');
define('FTP_CONTENT_DIR', '/httpdocs/wp-content/');
define('FTP_PLUGIN_DIR ', '/httpdocs/wp-content/plugins/');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', '123.456.789');
define('FTP_SSL', false);</code></pre>
<p>Place that in your <code>wp-config.php</code> file, just above the line that says, &#8220;That&#8217;s all, stop editing! Happy blogging.&#8221; Don&#8217;t forget to edit the username, password, and any other variables with your own information.</p>
<p>If you&#8217;re asking yourself why bother with all of this information, it&#8217;s because WordPress auto-updates features is SO awesome that it&#8217;s worth resolving any issues to get it working. Together with automatic plugin and theme updates, auto-WordPress updates have saved us many hours of work. For some sites, auto-updates works perfectly, for others, not so much. Just remember what you&#8217;re playing for here &ndash; it looks like this and will make keeping up with WordPress updates a much more enjoyable experience.</p>
<p><img src="http://digwp.com/wp-content/blog-images/auto-updates-success.gif" alt="[ Screenshot: Auto-Update Success ]" /></p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/04/wordpress-auto-updates/">Permalink</a> | <a href="http://digwp.com/2011/04/wordpress-auto-updates/#comments">13 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/04/wordpress-auto-updates/&title=What to do when Auto-Update Fails">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/tips/" rel="tag">tips</a>, <a href="http://digwp.com/tag/tricks/" rel="tag">tricks</a>, <a href="http://digwp.com/tag/updates/" rel="tag">updates</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/04/wordpress-auto-updates/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Poll: Love or Hate the WordPress Admin Bar</title>
		<link>http://digwp.com/2011/04/poll-love-hate-admin-bar/</link>
		<comments>http://digwp.com/2011/04/poll-love-hate-admin-bar/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 19:58:34 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[polls]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=3924</guid>
		<description><![CDATA[WordPress 3.1 includes the new Admin Bar. It&#8217;s enabled by default for all users, and provides quick links to key Admin pages. There&#8217;s been some strong opinions on both sides, so let&#8217;s put it to a vote: © 2011 Digging into WordPress &#124; Permalink &#124; 53 comments &#124; Add to del.icio.us &#124; Post tags: polls]]></description>
			<content:encoded><![CDATA[<p>WordPress 3.1 includes the new Admin Bar. It&#8217;s enabled by default for all users, and provides quick links to key Admin pages. There&#8217;s been some strong opinions on both sides, so let&#8217;s put it to a vote:</p>
<p><span id="more-3924"></span></p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/04/poll-love-hate-admin-bar/">Permalink</a> | <a href="http://digwp.com/2011/04/poll-love-hate-admin-bar/#comments">53 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/04/poll-love-hate-admin-bar/&title=Poll: Love or Hate the WordPress Admin Bar">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/polls/" rel="tag">polls</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/04/poll-love-hate-admin-bar/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Hosting Client Sites on a WordPress Network</title>
		<link>http://digwp.com/2011/02/hosting-clients-wordpress-network/</link>
		<comments>http://digwp.com/2011/02/hosting-clients-wordpress-network/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 15:51:08 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[clients]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=3629</guid>
		<description><![CDATA[Regular updates keep WordPress secure and expand the feature set, ensuring the platform meets both the developer’s and their client’s needs. The flipside of regular updates is the maintenance of WordPress installs. Once you start maintaining more than a few installs for your clients, keeping both plugins and WordPress up to date can become a [...]]]></description>
			<content:encoded><![CDATA[<p>Regular updates keep WordPress secure and expand the feature set, ensuring the platform meets both the developer’s and their client’s needs.</p>
<p>The flipside of regular updates is the maintenance of WordPress installs. Once you start maintaining more than a few installs for your clients, keeping both plugins and WordPress up to date can become a bit repetitive.</p>
<p>Setting up a WordPress Network, using the multisite feature, reduces maintenance time. Upgrading all your sites becomes almost as easy as upgrading it for one.</p>
<p><span id="more-3629"></span></p>
<h3>Setup hosting to allow wildcard sub-domains</h3>
<p>I’ve found setting up a WordPress network in sub-domain mode &ndash; <code>site1.example.com</code>, <code>site2.example.com</code> &ndash; works slightly better than it does in sub-directory mode.</p>
<p>Sub-domain mode requires you set up wildcard aliases for your web and <abbr title="Domain Name Server">DNS</abbr> servers. Setting up a wildcard alias in Apache requires a single line be added directly below the appropriate ServerName command:</p>
<pre><code>SeverAlias *.example.com</code></pre>
<p>On your DNS server, you need to add a wildcard sub-domain pointing to your ip address:</p>
<pre><code>*.example.comÂ Â  10.10.10.10</code></pre>
<p>The <a href="http://codex.wordpress.org/Create_A_Network#Step_2:_Setting_Wildcard_Subdomains">WordPress Codex</a> provides further information on setting up wildcard domains for various control panels.</p>
<h3>Install WordPress and setup Network</h3>
<p>You need to setup a WordPress network from a fresh install of WordPress. As a reader of <a href="http://digwp.com/">Digging into WordPress</a>, you can probably do this in your sleep.</p>
<p>Unlike a standard WordPress install, a WordPress Network must be installed in the root directory of a web server. I purchase domains for this purpose but you can use a sub-domain.</p>
<p>Once your <code>wp-config.php</code> file has been generated, you need to add this line to the file:</p>
<pre><code>define('WP_ALLOW_MULTISITE', true);</code></pre>
<p>You then need to visit <strong>WP Admin &gt; Tools &gt; Network </strong>where the instructions to create a network are easily followed. The <a href="http://codex.wordpress.org/Create_A_Network">Create a Network</a> page in the codex is also helpful.</p>
<p>You’ll be ask to make changes to the <code>.htaccess</code> and <code>wp-config.php</code> files and create the directory <code>blogs.dir</code> in <code>wp-content</code>.</p>
<h4>Decide on limitations</h4>
<p>Before setting up clients on a WordPress site, you need to decide what you’ll permit them and their visitors to do. The settings you choose here affect everyone from site administrators down.</p>
<p>The settings to consider are (the settings I use are in brackets):</p>
<ul>
<li>Can site administrators create new users? (No)</li>
<li>Which media upload buttons appear above the visual editor? (All)</li>
<li>How much disk space does each site have for uploads? (Unlimited)</li>
<li>What types of files can be uploaded? (Default listing)</li>
<li>Maximum upload size of an individual file? (20000 kb)</li>
<li>Is the plugins menu enabled for sites? (No)</li>
</ul>
<p>I strongly advise you to keep the plugins menu disabled too. Your client is paying you to maintain WordPress because they lack the technical expertise; you don’t want them to enable <a href="http://wordpress.org/extend/plugins/wordpress-reset/">WordPress Reset</a> and delete everyone’s database.</p>
<p>Registration settings for the network need to be configured to. As this is for hosting your client’s sites, you’ll want to disable registration of new sites. You can choose to disable registrations entirely or allow user accounts to be registered.</p>
<p>To keep track of who is using the system, I disable registrations entirely. Site owners contact me when they need to add another user. Disabling registrations also prohibits requiring visitors to register before they can comment.</p>
<p>Once you’ve considered the limitations you want to apply to your clients, set them up at <strong>WP Admin &gt; Super Admin &gt; Options</strong>.</p>
<h3>Adding clients to a WordPress Network</h3>
<p>You can add users to the network at <strong>WP Admin &gt; Super Admin &gt; Users</strong>. I use a standard format for usernames to make searching easier.</p>
<p>With users added, you can now add their sites through <strong>WP Admin &gt; Super Admin &gt; Sites</strong>. Once their site is added you need to:</p>
<ol>
<li>Edit the site (hover over the site in the list and click edit)</li>
<li>Enable the theme/s for the site</li>
<li>Add users with appropriate permissions to the site</li>
</ol>
<h3>Install Domain Mapping Plugin</h3>
<p>Your client’s sites will use their own domain, rather than a sub-domain of the WordPress Network. This requires <a href="http://ocaoimh.ie/">Donncha O Caoimh</a>’s <a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/">WordPress MU Domain Mapping</a> plugin.</p>
<p>Unzip the plugin on your local machine, upload <code>domain_mapping.php</code> to the directory <code>/wp-content/mu-plugins</code> (create it if it doesn’t exist) and upload <code>sunrise.php</code> to <code>/wp-content/</code>. In your <code>wp-config.php</code> file add the line:</p>
<pre><code>define( 'SUNRISE', 'on' );</code></pre>
<p>Go to <strong>WP Admin &gt; Super Admin &gt; Domain Mapping</strong> and set your server’s <abbr title="Internet Protocol">IP</abbr> address or its domain name in the CNAME entry. I always <em>enable permanent redirect</em> and usually enable <em>user domain mapping page</em>. If using a caching plugin (see below), I disable <em>redirect administration pages</em>.</p>
<p>You can then add domains to your client’s sites by visiting WP (Client Site) <strong>Admin &gt; Tools &gt; Domain mapping</strong>.</p>
<p>Otto has written up a great guide to using the <a href="http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/">domain mapping plugin</a>.</p>
<h3>Selecting plugins</h3>
<p>A poorly coded or insecure plugin can cause enough problems on a standalone WordPress install. BecauseÂ  a WordPress Network uses the same files and database across multiple sites, the problems are compounded.</p>
<p>Choosing plugins for a WordPress Network requires a <em>glass half empty</em> approach. The feature list of a plugin will tell you what it adds to your site, the code and support forums tell you what it takes away.</p>
<p>A good approach to take is to stick to plugins and plugin authors that are well-respected within the WordPress community. <a href="http://wordpress.org/extend/plugins/tags/wordpresscom">Plugins used on WordPress.com</a> are a good starting point, as are plugins by <a href="http://profiles.wordpress.org/users/joostdevalk/">Yoast</a>, <a href="http://profiles.wordpress.org/users/donncha/">Donncha</a>, and <a href="http://profiles.wordpress.org/users/automattic/">Automattic</a>.</p>
<p>Big name or not, review the plugin’s code before installing it on your WordPress Network. Look for forms using nonces, wide use of the WordPress APIs, escaped database queries, among other things.</p>
<h3>Other considerations</h3>
<p>Hosting more sites on your server uses more resources so you should find ways to lighten the load.</p>
<p>The first plugin I install, (this goes for standalone sites too) is Jason Penny’s <a href="http://jasonpenney.net/wordpress-plugins/use-google-libraries/">Use Google Libraries</a>, which uses Google’s servers for hosting available JavaScript libraries. You must load <a href="http://bigredtin.com/behind-the-websites/javascript-the-wordpress-way-part-1/">JavaScript the WordPress</a> way for this to have an affect.</p>
<p>If you’re creating bespoke themes for your clients, you probably have a standard starting point. If you’re not already doing so, you should use <a href="http://codex.wordpress.org/Child_Themes">parent &amp; child themes</a> so you can fix bugs in your starting point and the changes instantly propagate to all the sites you host.</p>
<p>A parent theme will also allow you to share resources across multiple sites. If you use a base JavaScript or <abbr title="Cascading Style Sheets">CSS</abbr> file, reference it from the same <abbr title="Uniform Resource Locator">URL</abbr> at all times.</p>
<p>If you want to lower resource use further, install a caching plugin. I use <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a> on my server. It’s not easy to configure but when I did so, I saw an immediate drop in resource use and, more importantly, <a href="http://pingdom.com/">Pingdom</a> reported a five-fold drop in response times.</p>
<p>Total Cache makes significant changes to the <code>.htaccess</code> file so <strong>exactly the same settings</strong> need to be used for all sites on your network.</p>
<h3>Security, security, security</h3>
<p>As I said earlier, a WordPress network shares files and the database across multiple sites. Any security issues a plugin, or theme, introduces are compounded as a result.</p>
<p>I can’t emphasise enough the importance of putting security first.</p>
<h3>About the Author</h3>
<p>Peter Wilson is a WordPress developer based in Melbourne, Australia, and started coding for the web in 1994.</p>
<p>Peter co-founded web production studio <a href="http://soupgiant.com">Soupgiant</a> in 2009 and forms opinions on all things web at <a href="http://bigredtin.com/">Big Red Tin</a>.</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/02/hosting-clients-wordpress-network/">Permalink</a> | <a href="http://digwp.com/2011/02/hosting-clients-wordpress-network/#comments">43 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/02/hosting-clients-wordpress-network/&title=Hosting Client Sites on a WordPress Network">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/clients/" rel="tag">clients</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/02/hosting-clients-wordpress-network/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Should Clients Update Their Own Sites?</title>
		<link>http://digwp.com/2011/01/should-clients-update-their-own-sites/</link>
		<comments>http://digwp.com/2011/01/should-clients-update-their-own-sites/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 20:41:53 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=3596</guid>
		<description><![CDATA[A common question for WordPress designers/developers is how to handle plugin upgrades and upgrades of WordPress itself. I recently logged into a client site for maintenance to find that someone had &#8220;attempted&#8221; an upgrade of WordPress, but that it had failed: An automated WordPress update has failed to complete &#8211; please attempt the update again [...]]]></description>
			<content:encoded><![CDATA[<p>A common question for WordPress designers/developers is how to handle plugin upgrades and upgrades of WordPress itself. I recently logged into a client site for maintenance to find that someone had &ldquo;attempted&rdquo; an upgrade of WordPress, but that it had failed:</p>
<blockquote><p>An automated WordPress update has failed to complete &#8211; please attempt the update again now.</p></blockquote>
<p><span id="more-3596"></span></p>
<p>For the past two years, this particular client had been great about ignoring the &ldquo;Upgrade Now&rdquo; nag and just waiting until the next scheduled maintenance (I usually check &amp; update things every six weeks or so). But for some reason, one of the site&rsquo;s Admins felt the need to click the Update button and give it a shot. And the auto-update <em>failed</em>.</p>
<p>I think one of the reasons why they <em>acted</em> instead of <em>waiting</em> is that the <abbr title="WordPress">WP</abbr>-upgrade message to the current version (3.0.4) included a message that emphasized that it was an urgent/important upgrade (because of the security issues with 3.0.3). I don&rsquo;t have proof of this, or a copy of this most recent update message, but I&rsquo;m thinking that the client saw that message and just sort of panicked. </p>
<p>Needless to say, my clients are now advised that I am only a <a href="http://twitter.com/perishable" title="Jeff Starr on Twitter">tweet away</a> from helping out in such emergencies, and that they should <strong>not</strong> attempt to upgrade anything themselves, regardless of how utterly <em>easy</em> the upgrade process seems to be.</p>
<h3>Should clients update their own sites?</h3>
<p>So that&rsquo;s all pretty anecdotal, but after receiving numerous emails on the topic, I thought it would be helpful to put the idea out there and hear what other WordPress designers think about letting clients upgrade their own sites. </p>
<p>Surely, the answer depends on many factors, including the client&rsquo;s experience with WordPress, web design, and so on, but my guess is that most clients choose WordPress because it so <em>easy</em> to use, not because they are the world&rsquo;s most tech-savvy Admins. I guess my point here is that a majority of WordPress users aren&rsquo;t adequately prepared to deal with an emergency if the &ldquo;easy update&rdquo; doesn&rsquo;t go as planned.</p>
<h3>What do you think?</h3>
<p>Should clients be instructed to update their own sites? Just press the button and hope for the best? Updates usually go smooth, but you can&rsquo;t <em>assume</em> that they always will. Case in point is the Admin who tried upgrading before I could log in and do it myself. They probably saw the update-now message and thought something like this:</p>
<ul>
<li>Well, that certainly <em>sounds</em> important</li>
<li>Well, that certainly <em>looks</em> easy enough</li>
</ul>
<p>And so then they click the button and give it a try. <em>If</em> it works, then great, everything works out and nobody skips a beat. If the upgrade <em>fails</em> on the other hand, the site could crash and data could be lost. In my opinion, WP &amp; plugin updates should only be handled by someone who <em>understands</em> what they are doing, takes the time to check for issues, and knows how to fix things if/when necessary. But that&rsquo;s just one opinion &ndash; what&rsquo;s yours?</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/01/should-clients-update-their-own-sites/">Permalink</a> | <a href="http://digwp.com/2011/01/should-clients-update-their-own-sites/#comments">66 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/01/should-clients-update-their-own-sites/&title=Should Clients Update Their Own Sites?">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/clients/" rel="tag">clients</a>, <a href="http://digwp.com/tag/updates/" rel="tag">updates</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/01/should-clients-update-their-own-sites/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
	</channel>
</rss>

