Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

wordpress url relocation

  • 13-04-2016 04:06PM
    #1
    Registered Users, Registered Users 2 Posts: 44


    Hi,

    I have been developing a website at its located at www.mysite.ie/wp. Now i want to make it live and redirect it to www.mysite.ie.

    is there an easy way to do this?


Comments

  • Registered Users, Registered Users 2 Posts: 396 ✭✭M.T.D


    In the admin settings/general
    Wordpress address should be the folder wordpress is in http://www.mysite.ie/wp
    and the site address should be changed to http://www.mysite.ie
    copy (copy not move) the index.php and .htaccess files from http://www.mysite.ie/wp to http://www.mysite.ie/
    Then in http://www.mysite.ie/index.php change the line - require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    to
    require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
    assuming wp is the folder wordpress is in.


  • Registered Users, Registered Users 2 Posts: 16,415 ✭✭✭✭Trojan


    I'd go as far as to say there is no "easy way" to do this as it can be tricky, especially for non-techies. There are a few different ways to do it - see more here: https://codex.wordpress.org/Changing_The_Site_URL

    The simplest of the options is probably this: add these lines to the functions.php file of your theme, immediately after the initial "<?php" line :
    update_option('siteurl','http://www.example.com');
    update_option('home','http://www.example.com');
    Now load your site from its new location in a browser window. It should work ok. If it does, then delete those lines from your functions.php - the settings are already stored in your database and should not be modified each time your site is loaded.


  • Registered Users, Registered Users 2 Posts: 44 MikeFantana


    Thanks guys,

    MTD That worked a treat

    thanks


  • Registered Users, Registered Users 2 Posts: 396 ✭✭M.T.D


    As an additional thought. If you put any direct links in the site content, to other site pages or images with the ..../wp... in the url you may need to update them.


Advertisement