sitemap.xmlを自動生成するプラグイン

もはやSEOの基本中の基本となったsitemap.xmlを自動生成するプラグインを導入しました。

Google (XML) Sitemaps Generator for WordPress

解凍してwp_contents/pluginsに入れるだけ。あとは管理画面からプラグインを有効化して、「The sitemap wasn’t built yet. Click here to build it the first time.」をクリックしてsitemap.xmlを作成します。

ちなみにその際、

# There was a problem writing your sitemap file. Make sure the file exists and is writable.
# There was a problem writing your zipped sitemap file. Make sure the file exists and is writable.

というエラーが出ましたが、パーミッションの関係でファイルが作成できないのが原因と思われます。
一時的にルートディレクトリのパーミッションを777にして、「rebuild the sitemap manually.」をクリックしたら無事sitemap.xmlsitemap.xml.gzが生成されていました。

自分の環境では最初のファイル生成さえすませておけば、あとはパーミッションエラーは出ず、随時更新されています。

作成したsitemap.xmlはこれになります→sitemap.xml

最後の仕上げにrobots.txtをアップして終了です。

User-agent: *
Sitemap: http://www.hello-wordpress.com/sitemap.xml

タグ: , ,

関連記事

コメントをどうぞ