/ home / wordpress / changing the wordpress url directly in the database /

Changing the Wordpress URL directly in the database

11:14 pm, February 25, 2016 676 487 2.4 @ 200 wpmrate up KruXoR source
1

Original Post Date: 6:39 am, August 23, 2014

Changing the Wordpress URL directly in the database

Note: you can follow this process below, or you can just install this addon and change it. https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ (much easier!)

Note 2 : If you want to just add the url to the config you can do that, but it means you cant change it within wordpress. Add the following to your wp-config.php

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');


If you know how to access phpMyAdmin on your host, then you can edit these values directly to get you up and running again.

  1. Backup your database and save the copy off-site.
  2. Login to phpMyAdmin.
  3. Click the link to your Databases.
  4. A list of your databases will appear. Choose the one that is your WordPress database.
  5. All the tables in your database will appear on the screen.
  6. From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
  7. Click on the small icon indicated as Browse.
  8. A screen will open with a list of the fields within the wp_options table.
  9. Under the field option_name, scroll down and look for siteurl.
  10. Click the Edit Field icon which usually is found at the far left at the beginning of the row.
  11. The Edit Field window will appear.
  12. In the input box for option_value, carefully change the URL information to the new address.
  13. Verify this is correct and click Go to save the information.
  14. You should be returned to your wp_options table.
  15. Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the> symbol to page through them.
  16. In the input box for option_value, carefully change the URL information to the new address.
  17. Verify this is correct and click Go to save the information.
codex.wordpress.org
11:14 pm, February 25, 2016 676 487 source

Comments

Reports

Add Report

Report's

KruXoR

This is a site where i basically just post whatever i feel like at the time, it has no one particular topic but usually. Just my ideas and links and random bits of code that i find.

Follow Me..

@KruXoR

Minecraft

Looking for the kruxor minecraft server mc.kruxor.com? we have migrated it to... icekraft.com if you want to play on there just connect to play.icekraft.com:25535 or mc.kruxor.com should also still work.

Favorite Links