• To whom it may concern,
    I tried to redirect a pre-built wordpress site to make it the main site. As an example I tried to move my https://example.com/wordpress site to the main site https://example.com through the ftp. I moved all the wordpress files from the example.com/wordpress folder to the https://example.com folder through the ftp. The index.php file and the .htaccess file is located in the correct root location known as /www or /public_html. When I try to access the site this is the message I get:
    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /home/psorg/public_html/index.php on line 17
    Thank you for your time and patience.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You should try re uploading the index.php file from
    www.remarpro.com.

    David_G

    (@questas_admin)

    You moved the files, did you change the url in the database?

    Thread Starter yont5983

    (@yont5983)

    I do not have access to the database. I might have changed the site url within the general settings on the WordPress dashboard. Just in case the site url change did not go through how can I change it through the ftp? Thank you for your time and patience.

    Put this in your theme functions.php file through FTP.
    EDIT: Be sure to change example.com to your domain name.

    update_option('siteurl','https://example.com');
    update_option('home','https://example.com');

    Then throw this in .htaccess file to make sure permilinks are OK.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # End WordPress

    Be sure to resave your permilink options after you got this fixed.

    Good Luck.

    Thread Starter yont5983

    (@yont5983)

    I re-uploaded the index.php file from www.remarpro.com and this is the message I received.
    Warning: require(/home/psorg/public_html/wp-blog-header.php): failed to open stream: No such file or directory in /home/psorg/public_html/index.php on line 17 Fatal error: require(): Failed opening required ‘/home/psorg/public_html/wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/psorg/public_html/index.php on line 17

    Thank you for your help as well as your valuable time and patience.

    I don’t know anymore. That is very weird.

    Try adding these 2 lines to wp config.

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);

    This will create a log inside wp-content with the problems i hope. These might offer a fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress site redirect’ is closed to new replies.