Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are all of Wordpress' public/direct entry-points?

I realize this is a bit of a strange question, but to put a long story short, we have a few Wordpress installs whose files are loaded through a symbolic link (the symlink is in the document root whereas Wordpress is not).

For this to work, I need to have a list of all Wordpress files that are usually loaded directly from the web browser (either by the user or through AJAX), such as: index.php, wp-login.php, (all theme files)* ...

An example of files that are not loaded directly: wp-load.php, wp-config.php, wp-blog-header.php...

[*] Theme files are an exception; they actually exist in the document root.

Edit: You might wonder, what is the point of this? It is so that we can cut down on the extra files on the server; it's useless to have thousands of identical files from each Wordpress website. The wp-content directory has been left there since it's what changes between websites. Am I aware of the consequences of such a set up? I believe I am.

Edit 2:

http://codex.wordpress.org/WordPress_Files

like image 920
Christian Avatar asked Jan 17 '13 22:01

Christian


People also ask

What are the WordPress core files?

WordPress Core files are the PHP and related source files that contain the main functionality of WordPress. Core files are not intended to be modified in ANY way. Modifying core files can introduce security vulnerabilities, incompatibilities, and other issues with the normal operation of WordPress.

What is the main WordPress directory?

The WordPress installation is in a root directory, generally public_html or public, and everything else comes within it. There are 3 core folders in the WordPress root directory: wp-content, wp-includes, and wp-admin.

What is WordPress home directory?

The WordPress root directory is the main directory where all of these files are located. If you can find the root directory of your WordPress website, you can easily search and access other file directories that you need to troubleshoot a specific problem.

Where is the WP-content directory?

Typically you will see the wp-content folder somewhere in the right panel of the web page straight away. If you cannot see a folder in the panel called wp-content , you may be able to find it in a different location in the left panel, such as: / public_html , /home/your_account_name , or /wordpress .


2 Answers

Here is a list of entry points based on require( 'wp-load.php' );

https://github.com/szepeviktor/WPHW/blob/master/wp-entry-points.md

And a Trac ticket about their deficiencies https://core.trac.wordpress.org/ticket/28364

like image 58
Szépe Viktor Avatar answered Oct 27 '22 09:10

Szépe Viktor


So far, the following fixes my issue:

ln -s /var/www/vhosts/mainsite/httpdocs/index.php /var/www/vhosts/subsite/httpdocs/index.php
ln -s /var/www/vhosts/mainsite/httpdocs/wp-login.php /var/www/vhosts/subsite/httpdocs/wp-login.php
ln -s /var/www/vhosts/mainsite/httpdocs/wp-admin /var/www/vhosts/subsite/httpdocs/wp-admin
ln -s /var/www/vhosts/mainsite/httpdocs/wp-includes /var/www/vhosts/subsite/httpdocs/wp-includes
like image 26
Christian Avatar answered Oct 27 '22 09:10

Christian