Title: Pitta Migration
Author: icc97
Published: <strong>2015 年 7 月 26 日</strong>
Last modified: 2015 年 8 月 24 日

---

搜索插件

![](https://ps.w.org/pitta-migration/assets/banner-772x250.png?rev=1207265)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/pitta-migration_7d7d7d.svg)

# Pitta Migration

 作者：[icc97](https://profiles.wordpress.org/icc97/)

[下载](https://downloads.wordpress.org/plugin/pitta-migration.0.4.2.zip)

 * [详情](https://cn.wordpress.org/plugins/pitta-migration/#description)
 * [评价](https://cn.wordpress.org/plugins/pitta-migration/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/pitta-migration/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/pitta-migration/#developers)

 [支持](https://wordpress.org/support/plugin/pitta-migration/)

## 描述

This plugin is aimed at developers that need to migrate their databases from
 production
to test or local domains.

This is the simplest way I’ve found to migrate databases quickly.

You only have to set the `WP_HOME`
 ([WordPress address URL](https://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29))
and `WP_SITEURL` ([Blog address URL](https://codex.wordpress.org/Editing_wp-config.php#Blog_address_.28URL.29))
constants once for each environment and then the database is automatically upgraded
when you import a database and login to the admin area.

This stands on the shoulders of the constants and fills the hole for when
 plugins
don’t follow the rules and use the database directly.

This plugin is designed to be the most lightweight way to migrate your database

and stay out the way of your own processes.

It works with WordPress to use WordPress’ own constants to update the database
 
using the [WordPress Database Object](https://codex.wordpress.org/Class_Reference/wpdb).
It avoids search and replaces in text files. It uses database queries to update 
the database as should be done.

Most developers have their own methods for exporting/importing the database –
 if
you can use `mysqldump` then you probably don’t want a WordPress plugin to do it
for you.

It makes no assumptions about your database and it’s cross platform.

P.S. Pitta is taken from the start of an [answer from WordPress SE](http://wordpress.stackexchange.com/a/182/5433):

> Deployment of a WordPress site from one box to another has been a PITA since
>  
> day one I started working with WordPress. (Truth-be-told it was a PITA with Drupal
> for 2 years before I started with WordPress so the problem is certainly not exclusively
> with WordPress.)

So this plugin aims to make things less PITA and more yummy Pitta (pedants will

mention that Pitta can also be spelled pita).

Its inspiration actually comes from the [second answer](http://wordpress.stackexchange.com/q/119/5433)

from the same [WordPress SE question](http://wordpress.stackexchange.com/q/119/5433).

Coincidentally there is a migratory bird called a [Pitta](https://en.wikipedia.org/wiki/Pitta):

> The fairy pitta migrates from Korea, Japan, Taiwan and coastal China to Borneo.

P.P.S. This plugin is based off the excellent [WordPress Plugin Boilerplate](https://github.com/theantichris/WordPress-Plugin-Boilerplate)
from antichris on Github

## 屏幕截图

 * [[
 * A successful migration message

## 安装

 1. Upload `pitta-migration` directory to the `/wp-content/plugins/` directory
 2. Insert the `WP_HOME` and `WP_SITEURL` constants into your `wp-config.php` file
 3. Activate the plugin through the ‘Plugins’ menu in WordPress
 4. As soon as you activate the plugin it will try to migrate the database to match
    the constants

## 常见问题

  I’ve imported my database to migrate and set WP_HOME and WP_SITEURL but nothing
happens

Check the the plugin is active. If you’re just restored a production database the
plugin might have been deactivated there.

As soon as you activate the plugin it will try to do the migration.

  It’s active too…

Check if it has run, by looking in the `wp_options` table for home and siteurl, 
as the session might have had problems and not displayed the message.

## 评价

![](https://secure.gravatar.com/avatar/836aeb082c821cb7fa794f8f219d1ec4bbaddc767a5ced1a1059265ab38984d9?
s=60&d=retro&r=g)

### 󠀁[The best I know](https://wordpress.org/support/topic/the-best-i-know-2/)󠁿

 [oekoplatt](https://profiles.wordpress.org/oekoplatt/) 2016 年 12 月 6 日

works perfectly Thank You

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/pitta-migration/reviews/)

## 贡献者及开发者

「Pitta Migration」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ icc97 ](https://profiles.wordpress.org/icc97/)
 *   [ theantichris ](https://profiles.wordpress.org/theantichris/)

[帮助将「Pitta Migration」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/pitta-migration)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/pitta-migration/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/pitta-migration/)，或通过[RSS](https://plugins.trac.wordpress.org/log/pitta-migration/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/pitta-migration/)。

## 更新日志

#### 0.4.2

 * Bug fix: Mark tested for WordPress v4.3, crop the screenshot

#### 0.4.1

 * Bug fix: Update this change log, remove trailing spaces

#### 0.4.0

 * Improvement: Add in a translations

#### 0.3.4

 * Improvement: Add in a screenshot

#### 0.3.3

 * Bug fix: The ‘migrated to’ URLs were showing the old ones

#### 0.3.2

 * Adding antichris as a contributor

#### 0.3.1

 * Bug fix: Missed off switching the setup view to stop using the `admin_notices`
   hook

#### 0.3.0

 * Bug fix: Switched to using `admin_notices` as the default hook instead of `admin_init`
   as the notice would sometimes not appear

#### 0.2.1

 * Removed excess logging

#### 0.2.0

 * Put the plugin into an object
 * Used the [WordPress Plugin Boilerplate](https://github.com/theantichris/WordPress-Plugin-Boilerplate)
   from antichris on Github

#### 0.1

 * The initial plugin that worked but was very basic

## 额外信息

 *  版本 **0.4.2**
 *  最后更新：**11 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.2 或更高版本 **
 *  已测试的最高版本为 **4.3.34**
 *  语言
 * [English (US)](https://wordpress.org/plugins/pitta-migration/)
 * 标签
 * [backup](https://cn.wordpress.org/plugins/tags/backup/)[database](https://cn.wordpress.org/plugins/tags/database/)
   [developer](https://cn.wordpress.org/plugins/tags/developer/)[migrate](https://cn.wordpress.org/plugins/tags/migrate/)
   [mysql](https://cn.wordpress.org/plugins/tags/mysql/)
 *  [高级视图](https://cn.wordpress.org/plugins/pitta-migration/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/pitta-migration/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/pitta-migration/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/pitta-migration/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/pitta-migration/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/pitta-migration/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/pitta-migration/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/pitta-migration/reviews/)

## 贡献者

 *   [ icc97 ](https://profiles.wordpress.org/icc97/)
 *   [ theantichris ](https://profiles.wordpress.org/theantichris/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/pitta-migration/)