<?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>Little.ws &#187; Wordpress基礎編</title>
	<atom:link href="http://little.ws/category/wordpress/wpkiso/feed" rel="self" type="application/rss+xml" />
	<link>http://little.ws</link>
	<description>web制作とかcssとかデザインとか色々～な覚え書き</description>
	<lastBuildDate>Sat, 04 Feb 2012 07:27:16 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>wordpress（アップデート）とFatal error（メモリが足りません）その2</title>
		<link>http://little.ws/200908/233.html</link>
		<comments>http://little.ws/200908/233.html#comments</comments>
		<pubDate>Wed, 05 Aug 2009 02:04:16 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress基礎編]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-config.php]]></category>
		<category><![CDATA[人にやさしく]]></category>

		<guid isPermaLink="false">http://little.ws/?p=233</guid>
		<description><![CDATA[先日の記事で解決出来ないのでというご質問をいただきました。 はじめに 個人的な考えなんですが、正直言って、wordpressのバージョンが上がってすぐの導入は全くオススメ出来ません。 テストサイトでの導入を行ったり、しば&#8230;]]></description>
			<content:encoded><![CDATA[<p>先日の記事で解決出来ないのでというご質問をいただきました。</p>
<h4>はじめに</h4>
<p>個人的な考えなんですが、正直言って、wordpressのバージョンが上がってすぐの導入は全くオススメ出来ません。<br />
テストサイトでの導入を行ったり、しばらくして落ち着いたら導入するようにしてます。<br />
2.8系がリリースされた直後にも何か不具合情報が沢山出てましたよね。。。</p>
<h4>wp-config.phpからの操作</h4>
<p>先日の記事では基本的なMemoryLimitの変更を書きました。ただ、wordpressでは、configファイルでphp.iniのMemoryLimitの値を書き換えてくれるんです。まずは、こちらを試すのが良いのかもしれません。</p>
<pre class="brush: php; title: ; notranslate">
//wp-config.phpに以下の一行を追加
define('WP_MEMORY_LIMIT', '64M');
</pre>
<p>アップデート時の注意点に関してはコリスさんに記事がありますので、そちらをご覧下さい。<br />
<a href="http://coliss.com/articles/blog/wordpress/update-note-and-ways-of-coping-wordpress-28.html" target="_blank" class="liexternal">WordPress 2.8のアップデートの注意点と対処法 | コリス</a><br/><br />
自分も先日、とても痛い思いをしましたのでDBのバックアップを取るプラグインは必ず導入しましょう！</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200908/233.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress：インポート時に気をつけろ！pingの罠</title>
		<link>http://little.ws/200907/230.html</link>
		<comments>http://little.ws/200907/230.html#comments</comments>
		<pubDate>Thu, 30 Jul 2009 01:56:03 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress基礎編]]></category>
		<category><![CDATA[Ping]]></category>
		<category><![CDATA[Smart Update Pinger]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[インポート]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://little.ws/?p=230</guid>
		<description><![CDATA[wordpressのデフォルトのping送信機能はかなり迷惑者なのは皆さんの知るところです。 というのも、デフォルトの機能だと記事の作成時のみならず、既存の記事をちょこっといじって更新したときにもPing送信しちゃいます&#8230;]]></description>
			<content:encoded><![CDATA[<p>wordpressのデフォルトのping送信機能はかなり迷惑者なのは皆さんの知るところです。<br />
というのも、デフォルトの機能だと記事の作成時のみならず、既存の記事をちょこっといじって更新したときにもPing送信しちゃいます。<br/><br />
そこで、<a href="http://www.daven.se/usefulstuff/wordpress-plugins.html" class="liexternal">Smart Update Pinger</a>というプラグインを使用しているのですが、これだと新規投稿時のだけPing送信するのです。<br />
んでここからが重要な問題。<br />
<span id="more-230"></span><br />
このブログではありませんが、自分の運営するサイトもサーバーのお引っ越しをしたのですが、そのサイトでインポート時にインポートする全ての記事を新しい記事と判断したらしく、全部Ping送信しちゃったみたいなんです。<br/><br />
<strong>『インポートってこんなに時間かかったっけ・・！？』</strong>と思ったときにはもう遅い。<br/><br />
スパム扱いされちゃうYO！<br />
インポート時にはプライバシー設定を『このブログを、検索エンジン (Google、Sphere、Technorati など) とアーカイブサイトを含め、誰でも閲覧できるようにする』にしときましょう。<br/><br/><br />
<strong>教訓！面倒くさがらずデータベースでインポートしましょう。</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200907/230.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress:インポート時のカテゴリ重複防止</title>
		<link>http://little.ws/200907/225.html</link>
		<comments>http://little.ws/200907/225.html#comments</comments>
		<pubDate>Wed, 29 Jul 2009 01:17:16 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress基礎編]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[インポート]]></category>
		<category><![CDATA[カテゴリ]]></category>
		<category><![CDATA[バグ]]></category>

		<guid isPermaLink="false">http://little.ws/?p=225</guid>
		<description><![CDATA[こんにちは。 wordpressでインポート作業をしたことがある人は分かると思いますが、1つのカテゴリが2つ作成されることがあります。 一つは記事が入っているカテゴリ、一つは記事が入ってないカテゴリという感じです。 さら&#8230;]]></description>
			<content:encoded><![CDATA[<p>こんにちは。<br />
wordpressでインポート作業をしたことがある人は分かると思いますが、1つのカテゴリが2つ作成されることがあります。<br />
一つは記事が入っているカテゴリ、一つは記事が入ってないカテゴリという感じです。<br/><br />
さらに、インポートするwordpressにエクスポートしたwordpressと同じカテゴリがあっても、そのなかにはインポートしてくれません。<br />
カテゴリ数が少なければ手作業で一つずつ削除していけば済むことですが、カテゴリ数が増えればそれは気の遠くなるような作業。<br/><br />
ということで、調べたらフォーラムで解決策がありましたので、以下自分用まとめです<br/><br />
（<a href="http://ja.forums.wordpress.org/topic/210" class="liwp">以下ほぼコピペですので元記事のフォーラムへこちらからどうぞ</a>）<br />
<span id="more-225"></span></p>
<h4>対策１</h4>
<p>このバグに関しては、日本語のカテゴリ名に対してスラッグを変更している場合に起きるようなので、スラッグを変更しない、もしくはエクスポート前にスラッグを変更前の%nn形式に戻してあげる。<br/></p>
<h4>対策2</h4>
<p>上記のバグ修正のため、<br />
/wp-admin/import/wordpress.php<br />
このファイルをごにょごにょします。<br/><br />
fromからtoへ変更（<a href="http://ja.forums.wordpress.org/topic/210#post-8444" target=_brank class="liwp">フォーラムmizube様ポストより</a>以下）</p>
<pre class="brush: php; title: ; notranslate">
/*
 * line 403-404:
 */
		// from:
		preg_match_all('|&lt;category&gt;(.*?)&lt;/category&gt;|is', $post, $categories);
		$categories = $categories[1];

		// to:
		preg_match_all('|&lt;category domain=&quot;category&quot; nicename=&quot;([0-9a-z%\-_]*?)&quot;&gt;(.*?)&lt;/category&gt;|is', $post, $categories);
		$nicenames  = $categories[1];
		$categories = $categories[2];

/*
 * Line 462-482
 */
			// from:
			if (count($categories) &gt; 0) {
				$post_cats = array();
				foreach ($categories as $category) {
					if ( '' == $category )
						continue;
					$slug = sanitize_term_field('slug', $category, 0, 'category', 'db');
					$cat = get_term_by('slug', $slug, 'category');
					$cat_ID = 0;
					if ( ! empty($cat) )
						$cat_ID = $cat-&gt;term_id;
					if ($cat_ID == 0) {
						$category = $wpdb-&gt;escape($category);
						$cat_ID = wp_insert_category(array('cat_name' =&gt; $category));
						if ( is_wp_error($cat_ID) )
							continue;
					}
					$post_cats[] = $cat_ID;
				}
				wp_set_post_categories($post_id, $post_cats);
			}

			// to:
			if ($c = count($categories) &gt; 0) {
				$post_cats = array();
				for ($i = 0; $i &lt; $c; $i++ ) {
					if ( '' == $categories[$i] || '' == $nicenames[$i] )
						continue;
					$cat = get_term_by('slug', $nicenames[$i], 'category');
					if ( empty($cat) || $cat-&gt;name != $categories[$i] ) {
						$slug = sanitize_term_field('slug', $categories[$i], 0, 'category', 'db');
						$cat = get_term_by('slug', $slug, 'category');
					}
					$cat_ID = 0;
					if ( ! empty($cat) )
						$cat_ID = $cat-&gt;term_id;
					if ($cat_ID == 0) {
						$category = $wpdb-&gt;escape($categories[$i]);
						$cat_ID = wp_insert_category(array('cat_name' =&gt; $category));
						if ( is_wp_error($cat_ID) )
							continue;
					}
					$post_cats[] = $cat_ID;
				}
				wp_set_post_categories($post_id, $post_cats);
			}
</pre>
<p>以上、wordpress2.8.2でも確認済みです。<br/><br />
詳しくは<a href="http://ja.forums.wordpress.org/topic/210" class="liwp">フォーラム</a>をご覧下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200907/225.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpressとFatal error（メモリが足りません）</title>
		<link>http://little.ws/200907/223.html</link>
		<comments>http://little.ws/200907/223.html#comments</comments>
		<pubDate>Tue, 28 Jul 2009 01:33:30 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress基礎編]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://little.ws/?p=223</guid>
		<description><![CDATA[移転時にプラグインを見直しながらやってたら、ダッシュボードにFatal errorの文字が。。 メモリ調べたら32MBらしいのですが、面倒なので128MBにしましょうということで、覚え書き。 ここのサーバーは.htacc&#8230;]]></description>
			<content:encoded><![CDATA[<p>移転時にプラグインを見直しながらやってたら、ダッシュボードにFatal errorの文字が。。<br />
メモリ調べたら32MBらしいのですが、面倒なので128MBにしましょうということで、覚え書き。<br />
<span id="more-223"></span><br />
ここのサーバーは.htaccessファイルでphp設定を許可してません。<br />
パブリックフォルダにphp.ini置いても良いのですがそれぞれのドメイン毎に設定を変えるかもしれないので、<br />
とりあえず今回はlittle.wsのフォルダに以下のphp.iniをUP。</p>
<pre class="brush: php; title: ; notranslate">
memory_limit = 128M
post_max_size = 33M
upload_max_filesize = 32M
max_execution_time = 600
display_errors = Off
log_errors = On
error_log = php_err.log.cgi
</pre>
<p>先述の様に128Mにして、あとはインポートの事もあったのでUPLOADのサイズも32Mへ。<br />
（UPLOADのサイズ変更に関しては他の方の迷惑にならないようにしましょう。。）<br/><br />
そして、.htaccessファイルに以下の一文を追加</p>
<pre class="brush: php; title: ; notranslate">
suPHP_ConfigPath /home/public_html/○○/
</pre>
<p><span style="color:red;">ココに追加するのはphp.iniが置いてあるパスです。</span><br/><br />
うちはこれで変更してます。<br />
.htaccessファイルの変更時は、パーマリンク設定変えると多分サーバーに勝手に出来てると思うのでそれに1行追加して上げるだけです。</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200907/223.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wp初めてのテーマ作成時に役立ちそうな記事</title>
		<link>http://little.ws/200901/141.html</link>
		<comments>http://little.ws/200901/141.html#comments</comments>
		<pubDate>Wed, 21 Jan 2009 04:51:28 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[Wordpress基礎編]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpressタグ]]></category>
		<category><![CDATA[wordpressテーマ]]></category>
		<category><![CDATA[ブックマーク]]></category>
		<category><![CDATA[人にやさしく]]></category>

		<guid isPermaLink="false">http://little.ws/?p=141</guid>
		<description><![CDATA[WordPressのテンプレート作成時に欠かせない有用チートシート:phpspot開発日誌 初めてのテーマ作成時に役立ちそうな記事。 元記事　My WordPress Cheat Sheet：Graphic Rating&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpspot.org/blog/archives/2009/01/wordpress_9.html" class="liexternal">WordPressのテンプレート作成時に欠かせない有用チートシート:phpspot開発日誌</a><br />
初めてのテーマ作成時に役立ちそうな記事。<br />
元記事　<a href="http://www.graphicrating.com/2009/01/18/my-wordpress-cheat-sheet/" class="liexternal">My WordPress Cheat Sheet：Graphic Rating</a><br />
<span id="more-141"></span><br />
Bloginfoタグとか未だに忘れるので・・記事を日本語にして覚え書き<br/></p>
<h4>Template Bloginfoタグ</h4>
<pre class="brush: php; title: ; notranslate">
&lt;?php bloginfo('name'); ?&gt; - ブログタイトルを出力
&lt;?php bloginfo('charset'); ?&gt; - 文字コード(UTF-8とか)を出力
&lt;?php bloginfo('description'); ?&gt; - ブログのdescriptionを出力
&lt;?php bloginfo('url'); ?&gt; - 一般設定で設定したブログアドレスを出力
&lt;?php bloginfo('rss2_url'); ?&gt; - RSSのURLを出力
&lt;?php bloginfo('template_url'); ?&gt; - テーマ（テンプレート）のURLを出力
&lt;?php bloginfo('pingback_url'); ?&gt; - ピンバック（トラックバック）用URLを出力
&lt;?php bloginfo('stylesheet_url'); ?&gt; - テーマのスタイルシートURLを出力
&lt;?php bloginfo('wpurl'); ?&gt; - WordPressのURLを出力
&lt;?php bloginfo('template_directory'); ?&gt; - テーマのディレクトリを出力
</pre>
<h4>一般的なタグ</h4>
<pre class="brush: php; title: ; notranslate">
&lt; ?php the_time() ?&gt; - 現在の記事の投稿・更新時間出力
&lt; ?php the_date() ?&gt; - 記事の投稿・更新日を出力
&lt; ?php the_title(); ?&gt; - 記事のタイトルを出力
&lt; ?php the_permalink() ?&gt; - 記事のURLを出力
&lt; ?php the_category() ?&gt; - 記事のカテゴリを出力
&lt; ?php the_author(); ?&gt; - 投稿者を出力
&lt; ?php the_ID(); ?&gt; - 現在の記事のIDを出力
&lt; ?php wp_list_pages(); ?&gt; - ページ一覧を出力
&lt; ?php wp_tag_cloud(); ?&gt; - タグクラウドを出力
&lt; ?php wp_list_cats(); ?&gt; - カテゴリ一覧を出力
&lt; ?php get_calendar(); ?&gt; - カレンダを出力
&lt; ?php wp_get_archives() ?&gt; - アーカイブを出力
&lt; ?php posts_nav_link(); ?&gt; - 新しい記事及び古い記事へのリンクを出力
&lt; ?php next_post_link() ?&gt; - 新しい記事へのリンクを出力
&lt; ?php previous_post_link() ?&gt; - 古い記事へのリンクを出力
</pre>
<h4>自分で作成したテンプレートファイルの読み込み</h4>
<pre class="brush: php; title: ; notranslate">
&lt; ?php include (TEMPLATEPATH . '/hogehoge.php'); ?&gt;
</pre>
<h4>ループについて</h4>
<pre class="brush: php; title: ; notranslate">
&lt; ?php if(have_posts()) : ?&gt;
   &lt; ?php while(have_posts()) : the_post(); ?&gt;
// Custom HTML &amp; PHP code
   &lt; ?php endwhile; ?&gt;
&lt; ?php else : ?&gt;
&lt; ?php endif; ?&gt;
</pre>
<p>タグによって、ループ内で使用と指定されるものがありますが、<br />
その場合は基本的に上記のソース内で使用します。<br/><br />
元ページより一部抜粋しました。</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200901/141.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

