WordPress is a widely used content management system that powers millions of websites. By default, WordPress is set to run on port 80, which is the default port for HTTP. However, in some cases, you may want to change the port number to another port, such as port 8080. In this article, we will show you how to change WordPress port 80 to 8080.
Open the wp-config.php File
The first step is to access the wp-config.php file in your WordPress installation. You can do this by logging into your hosting account and navigating to the root directory of your WordPress installation. Once you are in the directory, you will see a file named wp-config.php. Right-click on the file and select Edit.
Add the Port Number
Once you have opened the wp-config.php file, you need to add the following code at the end of the file:
Replace example.com with your actual domain name. The above code will change the WordPress site URL and home URL to use port 8080 instead of port 80.
Save the File
After adding the code to the wp-config.php file, save the file and close it.
Test Your Site
Once you have saved the changes, you can test your site by typing http://example.com:8080 in your web browser. If you can access your site without any issues, then you have successfully changed the WordPress port from 80 to 8080.
Changing WordPress port 80 to 8080 is a simple process that can be done by adding a few lines of code to the wp-config.php file. By following the steps outlined above, you can easily change the port number and test your site to ensure everything is working as expected. Remember to always backup your files before making any changes to ensure you can restore them if anything goes wrong.
Things To Consider When Changing WordPress Port 80 To 8080
Here are some things to consider when changing WordPress port 80 to 8080:
Check with your hosting provider: Before making any changes, it is important to check with your hosting provider to ensure that changing the port number will not violate any of their terms of service.
Check with your ISP: If you are hosting your site on your own server, make sure to check with your internet service provider (ISP) to ensure that the port you want to use is not blocked.
Redirects: Changing the port number may cause some issues with redirects. Make sure to test your site thoroughly after making any changes to ensure that all redirects are working properly.
SEO: Changing the port number may also affect your site’s search engine optimization (SEO) if you do not properly update your sitemap and notify search engines of the change.
Security: Changing the port number may also affect the security of your site. Make sure to update any security measures you have in place, such as firewalls, to reflect the new port number.
By considering these factors, you can ensure that changing the WordPress port 80 to 8080 will not cause any issues with your site’s performance, security, or SEO.