サイトのクラッシュで何時間も仕事を失ったことがありますか?そんなことはありません!私たちの経験では、定期的にバックアップを作成することで、予期せぬデータ損失で心臓が止まるような瞬間からあなたを救うことができます。
サイトのバックアップは、データを保護するための最も重要なステップの1つですが、多くのウェブサイトオーナーが見落としがちです。バックアップを作成する方法はたくさんありますが、WordPressデータベースを手動でバックアップすることは、重要なサイトデータを保護する簡単な方法です。
この投稿では、WordPressデータベースを手動でバックアップする手順を説明します。

以下は、これから取り上げるトピックの概要である:
- When and Why Make a WordPress Database Backup Manually?
- Option 1: Back Up Your Site's Database Using a Plugin (Easiest Way)
- Option 2: Create a Database Backup Manually With phpMyAdmin (No wp-admin Access)
- Option 3: Creating a cPanel Backup of Your Database (phpMyAdmin Alternative)
- How to Restore Your WordPress Database Backup
- How to Set Up a Proper Automated Backup System for the Future
WordPressデータベースの手動バックアップのタイミングと理由
WordPressの完全なバックアップシステムをインストールすることは、どのサイトにとっても不可欠です。しかし、サイト全体ではなくデータベースだけをバックアップする必要がある場合もあります。その理由を説明しましょう。
WordPressデータベースには、投稿、ページ、コメント、ユーザー、設定など、すべての動的コンテンツが含まれています。残りのサイトファイルには、テーマ、プラグイン、メディアアップローダーが含まれます。この違いを理解することで、正しいバックアップ方法を選択することができます。
私たちの経験では、データベースだけをバックアップするのは理にかなっている:
- コンテンツ関連の変更(投稿の一括編集など)
- WordPressコアの更新
- データベースと連動する新規プラグインのテスト
- データベース特有のトラブルシューティング
なぜなら、これらの操作は主にデータベースに保存されているコンテンツや設定に影響し、サイトのファイルには手を加えないからです。
一方、WordPressサイトの完全なバックアップは、あなたがいるときに必要です:
- 新しいWordPressホスティングサービスへの移行
- サイト全体のリニューアル
- 定期的なセキュリティ・バックアップの設定
- サイト構造の大幅な変更
これらの変更はデータベースとファイル(テーマ、プラグイン、メディアアップローダーを含む)の両方に影響するため、必要に応じて完全に復元できるようにすべてをバックアップする必要があるからです。
もしまだサイトの管理エリアにアクセスできるのであれば、プラグインを使って簡単にオンデマンドバックアップを作成することができる(どのプラグインを使うかはこの投稿の後半で紹介する)。
しかし、WordPressサイトがハッキングされた場合やWordPressエラーが発生した場合など、管理エリアにアクセスできない場合があります。私たちはこのような事態を何度も目にしてきました。このようなときこそ、手動バックアップの作成方法を知っておくことが重要になります。
ということで、WordPressデータベースのバックアップを手動で簡単に作成する方法を見ていきましょう。
💡 ハッキングされたWordPressサイトの修復にお困りですか? ハッキングされたサイトの修復サービスをご覧ください。少額の料金で、WordPressのセキュリティ専門家チームがお客様のサイトをすぐにクリーンアップして復元します。
設定1:プラグインを使ってサイトのデータベースをバックアップする(最も簡単な方法)
この方法は簡単でお勧めですが、WordPressサイトの管理エリアにアクセスできる場合にのみ有効です。
Duplicatorという WordPressバックアッププラグインを使用します。私たちは個人的にこのプラグインをパートナーサイトに使用しており、信頼性の高いバックアップを作成し、ダウンタイムなしでWordPressサイトを移行するのにとてもうまく機能しています。
無料版でもデータベースのバックアップを作成できますが、有料版にアップグレードするとより多くの機能が利用できます。どちらのバージョンも初心者にやさしく、上級ユーザーには十分パワフルです。
詳しくはDuplicatorのレビューをご覧ください。
まず、Duplicatorプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストールに関するチュートリアルをご覧ください。
有効化した後、Duplicator Pro ” バックアップページに行き、’新規追加’ボタンをクリックします。

次の画面で、Duplicatorはバックアップに含めるものを選択できます。
データベースのみ」を選択し、「次へ」ボタンをクリックします。

DuplicatorはWordPressサイトとデータベースをスキャンします。
その後、スキャン結果が表示されます。データベースセクションの横に、データベースのみのパッケージを作成していることを知らせるメッセージが表示されるかもしれません。

バックアップの作成」ボタンをクリックしてください。
Duplicatorはバックグラウンドでデータベースのバックアップを準備し、進捗状況を表示します。
完了すると、バックアップファイルをダウンロードできるようになります。アーカイブファイルとインストーラファイルの両方をダウンロードしておくと、必要なときに簡単にサイトを復元することができます。

設定2:phpMyAdminでデータベースのバックアップを手動で作成する(wp-adminにアクセスしない)
この方法では、phpMyAdminを使用する。これは、ウェブベースのインターフェースを使ってMySQLデータベースを管理できるオープンソースのソフトウェアです。これを使用して、WordPressの管理エリアにアクセスできない場合にデータベースをバックアップする方法を説明します。
phpMyAdminはほとんどのWordPressホスティングサービスにプリインストールされています。
この投稿では、Bluehostのスクリーンショットを示します。しかし、基本的な手順は、ほとんどのホスティングサービスと同じです。
まず、WordPressホスティングサービスのコントロールパネルにログインし、ウェブサイトの下にある「設定」ボタンをクリックします。

サイトの設定で、クイックリンクセクションまでスクロールダウンしてください。
次に、「phpMyAdmin」ボタンをクリックして続けます。

新しいブラウザータブでphpMyAdminアプリが起動します。
ここから、左の列からWordPressデータベースをクリックして選択し、上部にある「エクスポート」ボタンをクリックします。

エクスポート方法を選択するよう求められます。
次に「カスタマイザー」を選択すると、より多くのオプションが表示されます。
カスタマイザーを設定すると、WordPressデータベース内の選択したテーブルがすべて表示されます。
WordPressプラグインがデータベースにテーブルを追加することがあります。エクスポートから除外したいテーブルがあれば、選択を解除することができる。よくわからない場合は、すべて選択したままにしておくのがよいでしょう。

次に「出力」セクションまでスクロールダウンする必要がある。
初期設定では、phpMyAdminはエクスポートプロセスの出力をテキストで表示します。
Save output to a file(出力をファイルに保存)』オプションを選択して変更する必要がある。
圧縮については、zipまたはgzipオプションを選択する必要があります。

phpMyAdminは、データベースのエクスポートをzipまたはgzipファイルとして送信します。
これですべてです。これでWordPressデータベースの手動バックアップは完了です。
オプション 3: cPanel でデータベースのバックアップを作成する (phpMyAdmin の代替)
ほとんどの優れたWordPressホスティングサービス会社は、オンデマンドバックアップをダウンロードする簡単な方法も提供しています。ここでは、ホスティングサービスダッシュボードから手動でWordPressデータベースのバックアップを作成する方法を説明します。
Bluehost、SiteGround、HostGatorなどのホスティングサービスプロバイダーには、すべて同様のオプション設定があります。
このチュートリアルのために、我々はあなたにBluehostのスクリーンショットを表示します。しかし、基本的な手順は、他のホスティングサービスのために非常によく似ています。
まず、ホスティングアカウントのダッシュボードにログインし、サイトの下にある「設定」ボタンをクリックします。

次の画面では、「詳細」タブに切り替える必要があります。
ここから、cPanelセクションまでスクロールダウンし、「管理」ボタンをクリックするだけです。

これにより、新しいブラウザータブでcPanelインターフェースが起動します。
ここから、ファイルセクションまでスクロールダウンし、「バックアップ」ボタンをクリックします。

バックアップのページで、部分バックアップのセクションまでスクロールダウンします。
ここから、データベースのバックアップファイルをダウンロードするには、データベース名をクリックする必要があります。

必要であれば、このページからWordPressファイルのバックアップをダウンロードすることもできます。
WordPressデータベースのバックアップを復元する方法
WordPressデータベースのバックアップをダウンロードしたら、ハッキングされたWordPressサイトの修復を続行したり、必要な変更を加えたりすることができます。
多くの場合、サイトのバックアップを復元する必要はないでしょう。
しかし、そのような場合、データベースのバックアップからWordPressを復元する方法について、詳細なステップバイステップのガイドがあります。
将来のために適切な自動バックアップシステムを構築する方法
WordPressデータベースのバックアップを手動で作成することはできますが、これはWordPressサイトの適切なバックアップソリューションに代わるものではないことを忘れないでください。
WordPressのデータベースにアクセスできない場合があります。たとえば、ホスティングサービス会社がアカウントを停止したり、サイトのデータを紛失したりした場合です。
もうひとつ考えられるのは、ハッカーがWordPressのデータベースに悪意のあるコードを注入した場合だ。感染したデータベースをクリーンアップすることは、より困難となります。
そのため、DuplicatorのようなWordPressバックアッププラグインを使用することをお勧めします。
Duplicatorが気に入っている点は、Googleドライブ、Dropbox、OneDriveなどのクラウドストレージサービスにバックアップを自動的に作成して保存できることです。これにより、サイトにアクセスできなくなったり、ホスティングサービスサーバーに障害が発生したりしても、バックアップは常に安全でアクセス可能です。
WordPressサイトのバックアップ方法については、こちらのガイドをご覧ください。
この投稿がWordPressデータベースのバックアップを手動で作成する方法を学ぶのにお役に立てば幸いです。また、WordPressのバックアップをサイトとして表示する方法や、WordPressデータベースプラグインのエキスパートによるベストピックもご覧ください。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Mrteesurez
When I used Duplicator, free version to backup my site, do I still need to backup database separately when I have done a complete backup of the files ?
Isn’t a database not included ??
WPBeginner Support
The free version includes the database so you would not need to worry about that.
Admin
Prajwal Shewatkar
Backup is the only solution to achive ultimate security. No matter how much you try someday you’ll have security issues on website and only backups can save you. I recommend daily full backup.
WPBeginner Support
It would depend on how often content is added to a site for how often backups should be ran but they are great for keeping a site safe
Admin
Jiří Vaněk
I use phpMyAdmin for exporting the database. When I use a plugin, can I rely on the resulting backup being as comprehensive as using phpMyAdmin?
WPBeginner Comments
Yes, it should copy the whole WordPress database. It can actually be more comprehensive, because it can also include things like images and media.
Jiří Vaněk
Thanks a lot for the confirmation. So I will probably switch to an automated backup with the help of a plugin.
Moinuddin Waheed
I am getting stucked with the import file of the database in phpmyadmin of the local xampp server.
I wanted to make a test site for a live website, I followed the steps mentioned above but when I am importing the database file, it gives an error Maximum execution time of 300 seconds exceeded”
and it doesn’t proceed further.
is there a way I can solve this issue?
WPBeginner Support
That can happen if you are importing a large database, you would need to increase your execution time, our guide below has two methods you can use or you may need to go into your XAMPP options to change these settings if it does not work for you.
https://www.wpbeginner.com/wp-tutorials/how-to-fix-fatal-error-maximum-execution-time-exceeded-in-wordpress/
Admin
Moinuddin Waheed
Thanks for the reply.
I have sorted out this problem following this guide.
I increased the execution time limit and it worked.
so, by default the execution time is very less and it needs to be updated for importing large files.
Moinuddin Waheed
I have done manual backups many times and was unable to restore the back up database files in the liver server.
Having said this, is there any method which can ensure full back of everything like themes , settings and database all in one?
if this can be achieved, it would be very easy to restore any website without losing anything.
WPBeginner Support
We would recommend taking a look at our guide below for some of the ways to backup your files and database for what you are looking for.
https://www.wpbeginner.com/beginners-guide/how-to-backup-your-wordpress-site/
Admin
Moinuddin Waheed
Thanks for the recommendation, I have gone through the guide and found it really helpful for creating backup that can be used to restore the website when needed.
A Owadud Bhuiyan
Manually backing up the database is incredibly useful, especially when testing plugins locally.
WPBeginner Support
It can certainly be helpful
Admin
Richard
What is the difference between a database backup and a site backup performed by a plugin such as Duplicator Pro?
WPBeginner Support
It varies from plugin to plugin but normally a site backup includes the theme and plugin files while a database backup is for your content.
Admin
Rafal
I dont see any Backup Buttons on my Bluehost account: there are only tabs: Home, My sites, Marketplace, e-mail, domains, advanced
WPBeginner Support
Hi Rafal,
Click on the Advanced Tab to access the full cPanel interface.
Admin
Rose
If I have a premium or business wordpress site, then wordpress is my host, correct? What can I do from wordpress.com besides an export?
WPBeginner Support
Hi Rose,
Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
tim
Hi. I have all folders from a wordpress site but i dont have any database backup. Is it possible to restore drom folders without sql backup?
WPBeginner Support
Hi Tim,
No you cannot. You can try finding the lost content by using Google Cache or Way Back Machine.
Admin
David John
I have Finished the given all the steps, but i can’t backup my site, it shown be a Sever Error…And How to Rectify this error….
Rebecca
Can you use the built in “export” feature as a manual backup?
WPBeginner Support
Not a good idea. The export file will be able to import your comments and posts into WordPress. However, it will not be able to import images if they have been removed or lost from original server. It will also be unable to restore any other data stored in WordPress database.
Admin
afdhal ilahii
my i share this at my blog?
Syed Azad Shah
Dear Syed,
Many thanks for your wonderful posts. They are really doing miracles for me. Just one question – I have four or five sites running on one hosting account. One from main directory and rest from sub-directories. How do I go about backing them up all. My website is
Should I back them up as one file or different files
Thank you very much
Azad
WPBeginner Support
Depends on your setup. If all of them are using the same database, then you can select tables for each site and then export them. Repeat for the next site.
If they are using different databases then you need to export in different files.
Admin
Teguh
And how to restore it?
WPBeginner Support
See our guide, how to restore WordPress from backup.
Admin
Ahmed LAHMAR
Hi WPBeginner,
I use WP-DBManager and i would recommend it to anyone who wants some peace of mind it’s a wonderful plugin that you can backup your database, compress it into .gz file (my 70 mb SQL file became 5 mb after compression) and email it to you as schedueled. You can choose daily and weekly backup or you can do the backup manually.
The plus other featues like optimisation which you can scheduel as well
Ahmed LAHMAR
Sorry for typing mistakes m’y keyboard went mad