WordPress.org

Ready to get started?Download WordPress

Forums

403 Forbidden whole site when migrating to sub domain (1 post)

  1. foodboy
    Member
    Posted 1 year ago #

    Hi ,

    I am moving a WordPress site to 1 and 1 and using a sub domain to test. If I try and navigate to the sub domain, I get 403 Forbidden error, I also I get this error when I try and access wp-admin, in fact everything I access, I get this 403 Forbidden error.

    Below are the steps I took to migrate the site to 1 and 1

    1. I have down loaded all the WordPress files
    2. Exported the database .sql
    3. Created a new database on the new host
    4. Created a new sub domain on the new host
    5. ftp all the files to the new server sub domain, made this folder home, kept the same file structure.
    6. Imported the .sql file into the database.
    7. Updated wp.config to reflect the changes., db name, db user, db password, db path
    8. As I am using the subdomain to test, I needed to update the database tables to point to the test url I executed the following SQL queries

    UPDATE wp_options SET option_value='http://new site url' WHERE option_id='1'")
    UPDATE wp_posts SET guid = replace(guid, 'http://old site url','http://new site url)
    UPDATE wp_posts SET post_content = replace(post_content, 'http://old site url', 'http://new site url')

    When I navigate to these pages I get the 403 Forbidden error and an option to save the file. When I open the file, the contents are as follows
    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');

    Does anyone have any ideas as to what is causing this issue?

    Thanks in advance!

Topic Closed

This topic has been closed to new replies.

About this Topic