• Resolved Kodie Grantham

    (@kodiegrantham)


    Is there a way to make this plugin work with a WordPress install that has the core WordPress files in a separate directory?

    For example, my WordPress directory setup is like this:

    /public-html
    -/wp
    –/wp-admin
    –/wp-includes
    –/wp-load.php
    –/wp-login.php
    -/wp-content
    –/plugins
    –/themes
    –/uploads

    Thank you!

    https://wordpress.org/plugins/wp-photo-album-plus/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    From https://codex.wordpress.org/Editing_wp-config.php :

    Set WP_CONTENT_DIR to the full local path of this directory (no trailing slash), e.g.

    define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/blog/wp-content' );

    Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.

    define( 'WP_CONTENT_URL', 'http://example/blog/wp-content' );

    Setting WP_CONTENT_DIR in wp-config.php should be suficient for wppa+ to work.

    Thread Starter Kodie Grantham

    (@kodiegrantham)

    Hey Jacob! Thanks for the response! Unfortunately those two are already set in my wp-config and yet I still have issues with the plugin trying to upload/find uploads in /public_html/wp/wp-content for some reason. Also, wppa-ajax-front.php looks for wp-load.php in the root directory with this line:

    require_once ( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . ‘/wp-load.php’ );

    so that also causes file cannot be found errors.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You can fix wppa-ajax-front.php as follows:

    Change:

    require_once ( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );

    into:

    require_once ( ABSPATH . '/wp-load.php' );

    This will also be in the next version, so it will be update safe.

    At the moment it is too complicated for me to setup a testsite like yours, but i will help you out.

    Please look at Table XII of the Photo Albums -> Settings admin page.

    Inspect this table:

    WPPA_PATH 	Path to plugins directory. 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/wp-content/plugins/wp-photo-album-plus
    WPPA_NAME 	Plugins directory name. 	wp-photo-album-plus
    WPPA_URL 	Plugins directory url. 	http://beta.opajaap.nl/wp-content/plugins/wp-photo-album-plus
    WPPA_UPLOAD 	The relative upload directory. 	wp-content/uploads
    WPPA_UPLOAD_PATH 	The upload directory path. 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/wp-content/uploads/wppa
    WPPA_UPLOAD_URL 	The upload directory url. 	http://beta.opajaap.nl/wp-content/uploads/wppa
    WPPA_DEPOT 	The relative depot directory. 	wp-content/wppa-depot/japio
    WPPA_DEPOT_PATH 	The depot directory path. 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/wp-content/wppa-depot/japio
    WPPA_DEPOT_URL 	The depot directory url. 	http://beta.opajaap.nl/wp-content/wppa-depot/japio
    WPPA_CONTENT_PATH 	The path to wp-content. 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/wp-content
    wp_upload_dir() : ['basedir'] 	WP Base upload dir. 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/wp-content/uploads
    WPPA_ABSPATH 	ABSPATH windows proof 	/mnt/webc/d3/15/51893315/htdocs/opajaap/beta/

    and tell me what is in there and what it should be.

    If it is too complicated to generally fix this, i will provide a method to make them all editable. If these constants are right, it should work.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Sorry, but the fix for wppa-ajax-front.php does not work. I will come back to it

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Untick Table IV-A1.1 to use the standard ajax file. There is no other solution because ABSPATH is not defined yet, its defined in wp-load.php

    Thread Starter Kodie Grantham

    (@kodiegrantham)

    Hey Jacob! Here are the contents of the XII Table:

    WPPA_ALBUMS	Albums db table name.	wp_wppa_albums
    WPPA_PHOTOS	Photos db table name.	wp_wppa_photos
    WPPA_RATING	Rating db table name.	wp_wppa_rating
    WPPA_COMMENTS	Comments db table name.	wp_wppa_comments
    WPPA_IPTC	IPTC db table name.	wp_wppa_iptc
    WPPA_EXIF	EXIF db table name.	wp_wppa_exif
    WPPA_INDEX	Index db table name.	wp_wppa_index
    WPPA_FILE	Plugins main file name.	wppa.php
    WPPA_PATH	Path to plugins directory.	/home/youthforchrist/public_html/wp-content/plugins/wp-photo-album-plus
    WPPA_NAME	Plugins directory name.	wp-photo-album-plus
    WPPA_URL	Plugins directory url.	http://youthforchrist.upfor.review/wp-content/plugins/wp-photo-album-plus
    WPPA_UPLOAD	The relative upload directory.	wp-content/uploads
    WPPA_UPLOAD_PATH	The upload directory path.	/home/youthforchrist/public_html/wp/wp-content/uploads/wppa
    WPPA_UPLOAD_URL	The upload directory url.	http://youthforchrist.upfor.review/wp/wp-content/uploads/wppa
    WPPA_DEPOT	The relative depot directory.	wp-content/wppa-depot/webspec
    WPPA_DEPOT_PATH	The depot directory path.	/home/youthforchrist/public_html/wp/wp-content/wppa-depot/webspec
    WPPA_DEPOT_URL	The depot directory url.	http://youthforchrist.upfor.review/wp/wp-content/wppa-depot/webspec
    WPPA_CONTENT_PATH	The path to wp-content.	/home/youthforchrist/public_html/wp-content
    wp_upload_dir() : ['basedir']	WP Base upload dir.	/home/youthforchrist/public_html/wp-content/uploads
    WPPA_ABSPATH	ABSPATH windows proof	/home/youthforchrist/public_html/wp/

    the paths that should be changed:

    WPPA_UPLOAD_URL	The upload directory url.	http://youthforchrist.upfor.review/wp-content/uploads/wppa<br />
    WPPA_DEPOT_PATH	The depot directory path.	/home/youthforchrist/public_html/wp-content/wppa-depot/webspec<br />
    WPPA_DEPOT_URL	The depot directory url.	http://youthforchrist.upfor.review/wp-content/wppa-depot/webspec<br />

    Everything else seems fine to me. I’m not sure if the WPPA_DEPOT, WPPA_DEPOT_PATH, and WPPA_DEPOT_URL are supposed to have the username at the end of the directory but they do. (‘webspec’ is the admin user on this install)

    Thank you!

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Yes, they do end in loginname, every user has its own place to ftp to ( if you allow them ) before import ( if you allow them ).

    I will figure out, tomorrow. Stay tuned…

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Do the following:

    • Install the current development version ( 6.3.15.002 or later ), see:
      http://wppa.opajaap.nl/how-to-install-the-newest-development-version/ how to.
    • Add to wp-config.php:
      define( 'WPPA_UPLOAD_PATH', '/home/youthforchrist/public_html/wp-content/uploads/wppa' );
      define( 'WPPA_UPLOAD_URL', 'http://youthforchrist.upfor.review/wp-content/uploads/wppa' );
      define( '_WPPA_DEPOT_PATH', '/home/youthforchrist/public_html/wp-content/wppa-depot' );
      define( '_WPPA_DEPOT_URL', 'http://youthforchrist.upfor.review/wp-content/wppa-depot' );

    Note: NO trailing slashes!!
    Note: The leading underscore in ‘_WPPA_DEPOT_PATH’ and ‘_WPPA_DEPOT_URL’; these are the depot path and url exclusive the loginname.

    It should work now…

    Please test ‘everything’.

    Thread Starter Kodie Grantham

    (@kodiegrantham)

    Jacob! You’re the man! That fixed everything! Thank you so much for all of your help!

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    PS-1: You may need to verify/edit Table IX-H3: Source directory
    Also verify if the source files ( original photos ) are saved and accessable ( if you configured saving sources in Table IX_H ).

    PS-2: WPPA may have created some dirs in the wrong locations when the paths were not correct yet.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Support for installs with separated WordPress directory?’ is closed to new replies.