Thursday, March 7, 2013

[Windows Hosting] How To Remove Index.php From WordPress URL?

1) Open notepad or some text editor and paste this code in it:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
 <defaultDocument>
     <!-- Set the default document -->
      <files>
        <remove value="index.php" />
        <add value="index.php" />
      </files>
    </defaultDocument>
        <httpErrors errorMode="Detailed"/>
    <rewrite>
        <rules>
            <rule name="wordpress" patternSyntax="Wildcard">
                <match url="*" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                <action type="Rewrite" url="index.php" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>



and save it as web.config. (before save please ensure that it is saving as "All files" & not "Text Document" type)

2). Open you .htaccess file and delete all its content and add this code:

# 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


3). Lastly, Change the file permission for your .htaccess and web.config file to Read, Write and Edit mode.
Now go back to your WordPress Dashboard –> Permalinks. Index.php should be removed from permalinks. If you still face any issues, get in touch with me. I would be happy to help you.

source: http://webloggerz.com/how-to-remove-index-php-from-wordpress-url/

Saturday, February 9, 2013

Migrate Wordpress From LocalHost to FTP - 12 Steps

Thanks to Josh Kohlbach for the simple tutorial! (I modified so it looks easier to follow..)

1. Export your DB from the localhost using phpMyAdmin as a .zip/.sql
2. Open the file with Notepad or any text editor for editing
3. Do a string search for localhost (Ctrl + F, look for something like "http://127.0.0.1/" )
4. Replace it with your new domain/folder location in FTP, something like http://your-domain.com or http://your-domain.com/subdir/
5. Close it & Save in UTF-8 format. You might want to save a copy before edit anything just in case you need to revert.
6. Go to your domain > cPanel > database > phpmyadmin > Import the new .sql file. 
7. Using FileZilla (or equivalent FTP program) upload your website’s files to the web server.
8. While the upload is happening, it’s time to create the wp-config.php file for your production instance, make a copy of the existing wp-config.php file in your WP root directory.
9. Open and change the database value to the name of your web server’s database for your site. Also, change the username and password for the database as required.
10. Save this as wp-config.production.php and upload to your web server.
11. Once all uploading is complete, using FileZilla rename the existing wp-config.php file on your web server to wp-config.development.php and also rename wp-config.production.php to wp-config.php. Your new config file is now in effect.
12. Before you get all happy and try to visit your website you need to login to the WordPress admin(http://yourdomain.com/wp-admin)  and navigate to the Permalink settings. Once there just click the save button (don’t change anything, just re-save it). This resets the permalinks to your new URLs so the links to pages and posts will work throughout your site.
That's all! :)