I'm trying to set up a local WordPress development environment using Apache on Ubuntu 22.04. I followed these two tutorials: [list] [*]https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04 [/list] Here's my virtual host configuration ([code]/etc/apache2/sites-available/your_virtual_host.conf[/code]):
[code] ServerAdmin d3@gmail.com ServerName wordpress.dev ServerAlias www.wordpress.dev DocumentRoot /var/www/wordpress AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined [/code] Problem: [list] [*]When I access localhost, a blank page loads. [*]When I access wordpress.dev or www.wordpress.dev, it redirects to wordpress.org. [*]When I access localhost/wp-config.php, I see gibberish code instead of the expected content. [*]Accessing localhost/wp-login.php displays login form source code. [/list] What I've tried:
[code]Restarted Apache with sudo systemctl restart apache2 [/code] I've searched online but haven't found a solution that addresses these specific issues. Any help would be appreciated!