• Contact
  • About Me
  • Privacy Policy
DefenceDev
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
No Result
View All Result
DefenceDev
No Result
View All Result
ADVERTISEMENT
Home Projects WordPress

WordPress: Change Port from 433 to 8443

neo by neo
May 27, 2025
in WordPress
0
WordPress: Change Port from 433 to 8443

WordPress: Change Port from 433 to 8443

0
SHARES
33
VIEWS
Share on FacebookShare on Twitter
ADVERTISEMENT

Change default Port from 433 to 8443

Change the default port (443) for WordPress web applications is a crucial security measure. By altering the default port (usually port 80 for HTTP and 443 for HTTPS), users can enhance protection against common cyber threats. This practice helps mitigate unauthorized access and reduces the risk of automated attacks targeting well-known ports.

Why to Change the Default Port?

However, when changing ports, it’s essential to update server configurations, firewalls, and any associated infrastructure to ensure seamless functionality and accessibility for users while fortifying the overall cybersecurity posture of the web application.

VERY IMPORTANT: CREATE THE BACKUP OF ALL CONFIGURATION FILES!

ADVERTISEMENT

Steps to Change the WordPress Port from 433 to 8443

Step 1: Login to the WordPress WP-Admin and Change settings

Change the settings on the WordPress Settings:

WordPress General Settings
WordPress General Settings, Port Configuration

Step 2: Change Port Settings in your WebServer Configuration

Change the settings in the file: /etc/apache2/ports.conf

nano /etc/apache2/ports.conf 

Content of the file:


# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80

<IfModule ssl_module>
        Listen 8443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 8443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
<IfModule mod_ssl.c>
Listen 8443
</IfModule>

Step 3: Change the Settings in Web Server Site-Available Configuration

Change the settings in the file:

nano /etc/apache2/sites-available/wordpress-le-ssl.conf

Content of the file:

ADVERTISEMENT
<IfModule mod_ssl.c>
<VirtualHost *:8443>
    DocumentRoot /home/defenced/public_html
    <Directory /srv/www/wordpress>
        Options FollowSymLinks
        AllowOverride Limit Options FileInfo
        DirectoryIndex index.php
        Require all granted
    </Directory>
    <Directory /home/defenced/public_html/wp-content>
        Options FollowSymLinks
        Require all granted
    </Directory>


ServerName domain.com
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
</VirtualHost>
</IfModule>

Step 4: Change Settings in WordPress wp-config.php File

Change the settings on the file nano /home/defenced/public_html/wp-config.php

define('WPSITEURL','https://domain.com:8443/');
define('WPHOME','https://domain.com:8443/');

Check Settings on MySQL Server

Connect to your MySQL Server

# Connect to the MySQL Serber
mysql -u root

Select correct database, in my case it is wordpress

ADVERTISEMENT
use wordpress;

Check the settings save in the wp_options table:


# Execute the following query to check the settings:
select * from wp_options where option_name='siteurl';
select * from wp_options where option_name='home';

In case that you need to update this, use the following updates statements:

# In case that you need to update the values:
update wp_options set option_value='https://domain.com:8443' where option_name='siteurl';

update wp_options set option_value='https://domain.com:8443' where option_name='home';

defencedev.com

About The Author

neo

See author's posts

Tags: wordpress
ADVERTISEMENT
Previous Post

WordPress: Install Certbot Certificate on Your Site (Let’s Encrypt)

Next Post

Solutions: Run Command in Background on Ubuntu

neo

neo

Next Post
Solutions: Run Command in Background on Ubuntu

Solutions: Run Command in Background on Ubuntu

Follow Us

  • Trending
  • Comments
  • Latest
MikroTik: Export Configuration in Text File

MikroTik: Export Configuration in Text File

Fortinet FortiGate: Static Route Configuration via GUI and CLI

Fortinet FortiGate: Static Route Configuration via GUI and CLI

Immich: Installation on Ubuntu 22.04

Immich: Installation on Ubuntu 22.04

Fortinet FortiGate Upgrade Path Tool

Fortinet FortiGate Upgrade Path Tool

NextCloud: Port Forwarding - Essential Ports for Smooth Functionality

NextCloud: Port Forwarding – Essential Ports for Smooth Functionality and Remote Access

Organizing and Managing Photos with Immich: Features I Use

Organizing and Managing Photos with Immich: Features I Use

Install Ubuntu 22.04 on Oracle VM Virtual Box

Install Ubuntu 22.04 on Oracle VM Virtual Box

Linux Directories: cd (Change Directory), pwd (Print Working Directory), mkdir (Make Directory)

Linux Directories: cd (Change Directory), pwd (Print Working Directory), mkdir (Make Directory)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Recent News

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

MikroTik: Check Your Wireless Password

MikroTik: Check Your Wireless Password

ADVERTISEMENT

DefenceDev Tutorials

defencedev Logo

Whether you’re just starting or looking to expand your skills, I hope you find useful information and engaging discussions here. Let me take you through my journey and the goals behind this space!

Follow Us

Browse by Category

  • Blog
  • Cloud
    • Private
  • Linux Tutorials
    • Bash Scripting Tutorials
    • Commands
    • Networking
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Solutions
    • Docker
  • Video Tutorials
    • MikroTik Videos

Recent News

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

  • Site Map
  • Privacy Policy
  • Facebook Page
  • Disclaimer
  • Contact
  • About Me

© 2025 defencedev.com - All rights reserved.

No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos

© 2025 defencedev.com - All rights reserved.