略過並前往主要內容
致電我們
服務專線和服務時間
預約回電

無須線上等候,提交預約我們將儘快回電。

預約回電
說明中心

瀏覽我們線上說明資源

說明

Managed WordPress 說明

Change the table prefixes

Note: This is the fifth step in manually migrating a WordPress site to your Pro Managed WordPress account. If you don't have a Pro Managed WordPress account, you can learn more about them here.

Part 1: Copy the wp-content folder Part 2: Make an SQL dump file
Part 3: Upload the site content Part 4: Update the site database
Part 5: Change the table prefixes Part 6: Make final edits

This next step in manually moving a WordPress site to a Pro Managed WordPress account: Change table prefixes in the WordPress site database. You need to use phpMyAdmin to change the prefixes. Give yourself 10-15 minutes for this part.

Note: At the end of Part 4, you checked the table prefix in the site database. If that table prefix is not "wp", continue with the rest of this article. If that table prefix is "wp", skip this part and continue with Part 6.

  1. If you still have the phpMyAdmin page open for the site, continue with the next step. Otherwise, open phpMyAdmin for the Pro Managed WordPress site.
  2. In the list of tables, click the table name ending in usermeta.
    select usermeta
  3. Click SQL.
    click sql
  4. Highlight and delete the current code in the editing window.
  5. Copy and paste this code in the editing window (please note the differences in backticks vs single quotes):

    UPDATE `tablePrefix_usermeta` SET `meta_key`= REPLACE (`meta_key`, 'wp_', 'tablePrefix_') WHERE 'meta_key' LIKE 'wp_%'
    copy and paste code in editing window

  6. Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix. In our example, this code looks like:

    UPDATE `abc123_usermeta` SET `meta_key`= REPLACE (`meta_key`, 'wp_', 'abc123_') WHERE `meta_key` LIKE 'wp_%'

  7. Note: If your original WordPress database had a table prefix other than wp_, then you should replace the first wp_ in the code sample with the original prefix. However, the wp_% should never be changed.

  8. Click Go. The usermeta table is updated.
  9. In the list of tables, click the table name ending in options.
  10. Click SQL, and then remove the existing code again.
  11. Copy and paste this code in the editing window:

    UPDATE `tablePrefix_options` SET `option_name` = REPLACE (`option_name`, 'wp_', 'tablePrefix_') WHERE `option_name` LIKE 'wp_%'

  12. Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix.
  13. Click Go. The options table is updated.
  14. Close the phpMyAdmin page, but hang on to the table prefix - you'll need that in the next part. The last part!

Next step

More info

相關社群

JaneParish's Avatar
Recovering page content

4 回覆

Last posted 4 months ago.

Livininchina's Avatar
Failing to manually transfer a Wordpress site through FTP

1 回覆

Last posted almost 5 years ago.

pvseshasayan's Avatar
Unable to install Moodle 3.3+ (Build: 20170601)

5 回覆

Last posted over 2 years ago.

找不到主題嗎?搜尋社群