Title: WordPress site redirect
Last modified: August 30, 2016

---

# WordPress site redirect

 *  [yont5983](https://wordpress.org/support/users/yont5983/)
 * (@yont5983)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/)
 * 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 [http://example.com/wordpress](http://example.com/wordpress)
   site to the main site [http://example.com](http://example.com) through the ftp.
   I moved all the wordpress files from the example.com/wordpress folder to the 
   [http://example.com](http://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)

 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638070)
 * You should try re uploading the index.php file from
    wordpress.org.
 *  [David_G](https://wordpress.org/support/users/questas_admin/)
 * (@questas_admin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638093)
 * You moved the files, did you change the url in the database?
 *  Thread Starter [yont5983](https://wordpress.org/support/users/yont5983/)
 * (@yont5983)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638211)
 * 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.
 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638212)
 * Put this in your theme functions.php file through FTP.
    EDIT: Be sure to change
   example.com to your domain name.
 *     ```
       update_option('siteurl','http://example.com');
       update_option('home','http://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](https://wordpress.org/support/users/yont5983/)
 * (@yont5983)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638213)
 * I re-uploaded the index.php file from wordpress.org 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.
 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638215)
 * 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);
       ```
   
 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638216)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [tech55541](https://wordpress.org/support/users/tech55541/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-site-redirect/#post-6638216)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
