• Hello People, please help me , please please.
    I moved my sub directory website to my root domain.
    What I did to move:-
    I changed the site urls and address of my sub directory through settings and then moved all the wordpress files to the root folder. till then things were fine, but then I updated the links of the wordpress files through a wordpress plugin “wordpress url update” and updated the new url, but after that nothing is working right. Only the home page is showing but neither the main slider nor any other page is working please help ,,
    Please help, my old website link was – https://apexdemo.apexsolutions.in/wp/
    and the root link is https://apexsolutions.in

Viewing 1 replies (of 1 total)
  • First, adding something like this to .htaccess can redirect previous traffic to your site’s new location:

    # Permanent URL redirect - generated by www.rapidtables.com
    Redirect 301 /wp/ https://apexsolutions.in/

    https://www.rapidtables.com/web/tools/redirect-generator.htm

    It looks to me like your site is working other than at “Portfolio” where you might or might not yet have any actual content?

    If your database might still need further updating in relation to your move, the first or second of these might help:

    <?php
    /**
    * The base configurations of the WordPress.
    *
    * @package WordPress
    */
    /*-either-*/
    /** @ root/wp-config.php: /*toggle on/off*
    define('WP_HOME','https://domain.com');
    define('WP_SITEURL','https://domain.com');
    /*-or-*/
    /** @ root/wp-config.php: /*toggle on/off*
    define('WP_HOME','https://www.domain.com');
    define('WP_SITEURL','https://www.domain.com');
    /*-end-*/
    <?php
    /*-either-*/
    /* @ theme/functions.php /*toggle on/off*
    update_option('siteurl','https://domain.com');
    update_option('home','https://domain.com');
    /*-or-*/
    /* @ theme/functions.php /*toggle on/off*
    update_option('siteurl','https://www.domain.com');
    update_option('home','https://www.domain.com');
    /*-end-*/
    /* Leave everything else alone in wp-config.php all the way
    /* down to "That's all, stop editing! Happy blogging."
    /* Add the following immediately above (or replacing) that line:
    ** WordPress supports an automatic relocation method intended as quick assist
    ** for getting a site working after relocating it from one server to another.
    * After the "define" statements and just before "That's all, stop editing!"
    * Add a slash '/' at the end of this next line to run it:
    /***toggle on/off*
    define('RELOCATE',true);
    /** Next Login as normal after being absolutely certain of the address being sent from your browser.
    ** Then look again in your browser's address bar to verify you have logged in at the correct server.
    ** If this is the case...
    ** Next go to Dashboard > Settings > General to verify and save those address settings.
    ** Once the above has been completed, either remove the above 'define('RELOCATE',true);' line
    ** or comment it out with '//' or change the 'true' value to 'false' or just remove the '/' toggle.
    * Note: When the RELOCATE flag is set to 'true', the Site URL will be automatically updated
    * to whatever path is being used to access the login screen. This will get the admin section
    * up and running on the new URL, but it will not correct any other part of the setup.
    * Those will still need to be altered manually.
    /**
    * That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    edit: Adding a slash at the end of /*toggle on/off* will activate the desired line or lines there.

Viewing 1 replies (of 1 total)
  • The topic ‘Moved my subdirectory website to the root domain but it is giving error and page’ is closed to new replies.