0

How can I find where WordPress is located on Ubuntu? I have installed it using the instructions provided by the official Ubuntu tutorial: Install and configure WordPress

0

3 Answers 3

1

I suppose you search for WordPress data directory. Try this easy search:

sudo find / -iname "wordpr*"

Little bit more exact procedure is here:

List web services to find config file of the web pages.

service --status-all | grep -e "apache" -e "nginx" -e "http"

# eventually do full list of services:
service --status-all

Here is an example of the output. The Nginx web service is running in my case. See + sign:

 [ - ]  apache-htcacheclean
 [ - ]  apache2
 [ + ]  nginx

List all virtual webs and search for possible WordPress config file.

# Nginx:
ls -l /etc/nginx/sites-enabled

# Apache:
ls -l /etc/apache2/sites-enabled

If only one file is listed, it is a Wordpress web configuration file. Search for name like wp or wordpreess if more files are found. Let the file be named e.g. wordpress.

Now review this wordpress file with potential WordPress setting. Search for data directory path in the file.

# Nginx example:
grep "root" /etc/nginx/sites-enabled/wordpress

# Apache example:
grep -i "\<Directory " /etc/apache2/sites-enabled/wordpress

Example of output:

Nginx:

root /var/www/wordpress;
# deny access to .htaccess files, if Apache's document root
root /var/www/wordpress;

Apache:

<Directory />
<Directory /var/www/wordpress>
<Directory /var/www/wordpress>

Your WordPress directory is /var/www/wordpress in both cases.

Note:

Sometimes only web config file is /etc/apache2/apache2.conf if no virtual webs are set.

0

The simplest way is whereis wordpress

1
  • 1
    While the original question is unclear, it's more likely that the OP wants to know where the WordPress data is (see the other answer) rather than the binary. ;-) Jan 15, 2023 at 4:16
0

The provided tutorial installs it to /srv/www/wordpress/.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .