I just moved a website from a hosted web server to MAMP and I am getting a strange error.

When I visit the homepage I get the default "It works" apache message. the url should be test:8888 but the homepage is being converted to just test

To make matters worse all other pages are working EXCEPT ONE. This page is also being converted to test/my-page when it should be test:8888/my-page.


Any ideas why this could be happening? I have changed the siteurl and home options in the wp_options table to http://test:8888 and as I mentioned everything is working correctly except for these two pages.

Thanks for the help.


The :8888 is the port your local Apache server is listening on and isn't actually part of the url.

To use your own custom domain name locally open up your host file sudo nano /etc/hosts

and add this line to the bottom custom-domain.dev

Then add your domain to wp-config.php:

define( 'WP_HOME', 'http://custom-domain.dev' );  
define( 'WP_SITEURL', 'http://custom-domain.dev' );

Then you need to point the domain name in your Apache vhost to where your root directory is stored and change the port to 80. (You can do this using OSX's built in Apache / PHP. WPCandy has a good detailed tutorial on how.

Your Vhost should look like this:

NameVirtualHost *:80

# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.

<VirtualHost *:80>
DocumentRoot "/Users/your-name/Sites/blah"
ServerName custom-domain.dev
  • oddly enough MAMP uses port 8888 and switching to port 80 solves this issue. – Mike Oct 28 '11 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.