Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

wordpress url relocation

Options
  • 13-04-2016 5:06pm
    #1
    Registered Users 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 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 Posts: 16,402 ✭✭✭✭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 Posts: 44 MikeFantana


    Thanks guys,

    MTD That worked a treat

    thanks


  • Registered Users 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