WordPress Permalinks in a test environment

If you're working on a WordPress site before switching the nameservers then you'll probably be using one of our temporary links to your site, these are in the format:

http://#IP ADDRESS#/~#USERNAME#

You'll probably find your permalinks don't work properly because they redirect through the root of the domain and the domain is considered to be http://#IP ADDRESS#, this can be temporarily corrected by modifying your .htaccess file permalink block.

Note: The fix below is for the most common situation where your WordPress installation will live in the root of your domain when you switch to it being the live site.

You'll find your .htaccess says something similar to:


RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

To (replacing #USERNAME# as appropriate:


RewriteEngine On
RewriteBase /~#USERNAME#/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~#USERNAME#/index.php [L]

You'll need to swap this back when you move to it being the live site.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Resetting your password in WordPress

We're often asked if we can provide a WordPress password for our users, unfortunately this is...

Change the Admin Username in WordPress

Since the recent botnet attack on WordPress we've been asked a lot of times how to change...