
Check the WordPress site and it should be accessible now. SET `option_value` = replace(option_value, ' ' That should do it. In my case, the exact query that I executed is the following (I was going from port 81 to the default port): UPDATE `wp_options` SET `field_name` = replace(field_name, 'old_text', 'new_text') We are going to execute a DB query to search and replace the old port value.Click on the WordPress site’s database (the one that is not working).Here is how you can fix it by updating the port number value in the database: So we are going to update that value to the new port number. The reason the site is not loading after the port change is because of the site URL value (that contains the old port number) in the wp_options table. Next, click over to 'Ports.' The default MAMP ports are 8888 for Apache, and 8889 for MySQL.

The Main Reason for the Existing WP Site to Not Load Once you open MAMP, click the Preferences button. this tutorial contains the steps I took to resolve the issue. When I changed the Apache’s configuration to use port 80, all my existing WordPress sites stopped loading.
#MAMP WORDPRESS PORT NUMBER IN URL INSTALL#
I needed to change the port #80 so I could create a new localhost WP Multi-site install (multi-site installs only work on port 80). I have a few localhost WordPress installs that I used using Apache HTTP port #81. In this tutorial I will show you how you can easily rectify this issue so you can use the existing WordPress installs after a port change (no need to install WordPress from scratch). Trying to load the WordPress install will result in a 404 error. It will auto redirect to the URL with the old port number and fail to load.

If you have installed WordPress on localhost (example: using XAMPP) and then later you need to change the Apache’s HTTP port number, you will find that the existing WordPress installs will stop loading.
