WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Resetting URL in General Settings (8 posts)

  1. alienminds
    Member
    Posted 1 year ago #

    Dear Experts

    I very much hope that you can help me. I built a new website in WP and changed the WordPress Address and Site Address URLs in the General Settings from .dev to .co.uk as I thought I needed to do this before deploying files to a live server. Obviously I can no longer access the WP site locally now.

    The problem is I need to access it on the local server again...Is it possible to change the .co.uk back to .dev?

    Thank you in advance.

    Steve

  2. Umbercode
    Member
    Posted 1 year ago #

    There are several solutions to this, to name but two:

    1) Go to the database via phpMyAdmin and go to the table xx_options (where xxx is your prefix). Find the entries for 'siteurl' and 'home' and change them back to .dev

    2) Open your wp-config file and add the following two lines:
    define('WP_SITEURL', 'http://xxxxx.dev/');
    define('WP_HOME', 'http://xxxxxx.dev/');

    Either one should work, but if one does not try the other.

  3. alienminds
    Member
    Posted 1 year ago #

    Thank you for this Umbercode. I'm a bit new to all this. As I don't have phpMyAdmin I'm trying the second choice...Are you saying I need to delete the code below and replace with your two lines? If not where do I place the two lines on the wp-config file ( I know how to access thru Dreamweaver).

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'xxxxxxxxxx');

    /** MySQL database username */
    define('DB_USER', 'xxxxxxxxxx');

    /** MySQL database password */
    define('DB_PASSWORD', 'xxxxxxxxxx');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    Thanks

  4. MarkRH
    Member
    Posted 1 year ago #

    Don't delete anything that's there. Just add those two lines before or after the existing define() lines.

  5. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    No those lines stay (and need to include the correct text for your site), After the "define" statements (just before the comment line that says "That's all, stop editing!"), insert a new line, and add:

    define('WP_SITEURL', 'http://xxxxx.dev/');
    define('WP_HOME', 'http://xxxxxx.dev/');

    (make sure it's correct for your site)
    http://codex.wordpress.org/Editing_wp-config.php
    The lines noted above to be added are covered in above link.

  6. alienminds
    Member
    Posted 1 year ago #

    Thank you for all your replies.

    May I ask, will the fact that I changed the WordPress Address and Site Address URLs in the WP General Settings from .dev to .co.uk actually cause any problems when deploying files to a host provider to work on a live server?

  7. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    You will need to own and be able to manage the domain name (or have your trusted and popular web host setup your owned domain with them usually works out well)

  8. alienminds
    Member
    Posted 1 year ago #

    Thank you...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.