Score:0

How can I find where WordPress is located?

mz flag

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

Score:0
br flag

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.

Score:0
uz flag

The simplest way is whereis wordpress

NotTheDr01ds avatar
vn flag
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*. ;-)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.