How to upload my wordpress website developed locally to server ?

i have wordpress website at the following local path C:\wamp\www\wordpress and i want to upload it to the my online server and put it in directory called “wordpress” (public_html/wordpress) …

i want my website to go directly to the following link
http://example.com ) .. i made.htaccess file in the root of my public_html folder so when i type ( http://example.com ) it go to ( http://example.com/wordpress ) :

# WordPress htaccess file to make it point to the directory
# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On

#Change the following directory ( wordpress ) to make it point to the right directory
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

#Change the following directory ( wordpress ) to make it point to the right directory
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

the Problem here that all my links go to ( http://example.com/wordpress )

To solve that : 

The process to move WordPress into its own directory is as follows:

  1. Create the new location for the core WordPress files to be stored (we will use /wordpress in our examples). (On linux, use mkdir wordpress from your www directory. You’ll probably want to use “chown apache:apache” on the wordpress directory you created.)
  2. Go to the General panel.
  3. In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example:http://example.com/wordpress
  4. In the box for Site address (URL): change the address to the root directory’s URL. Example: http://example.com
  5. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  6. Move your WordPress core files to the new location (WordPress address).
  7. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
  8. Open your root directory’s index.php file in a text editor
  9. Change the following and save the file. Change the line that says:
    require(‘./wp-blog-header.php’);
    to the following, using your directory name for the WordPress core files:
    require(‘./wordpress/wp-blog-header.php’);
  10. Login to the new location. It might now be http://example.com/wordpress/wp-admin/
  11. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)

Reference  Link :

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: