UListing API 404 Error when WordPress is installed in a Subdirectory (Different
-
Dear uListing Support Team,
I am experiencing an issue where the filter and sort buttons fail to load on my listing archive page, resulting in a 404 Not Found error in the console.
1. Environment and Configuration
My WordPress setup is configured to run from a subdirectory while displaying the site from the root domain, which is a common practice.SettingValuePhysical WordPress Address (WP_SITEURL)
https://my-site.co.jp/sub-directorySite Address (WP_HOME)https://my-site.co.jpServer(e.g., Apache/Nginx)2. Technical Issue Details
The browser console shows the following error when the listing page attempts to load the form data:
POST https://my-site.co.jp/sub-directory/1/api/search-form/get-form-data 404 (Not Found)Key Observation:
- The plugin is incorrectly including the segment
/1/in the API path, resulting in the 404 error. The URL should ideally be resolved correctly through the standard WordPress REST API prefix.
3. Critical Findings (The Solution Test)
I have confirmed that the issue is directly linked to the difference between
WP_SITEURLandWP_HOME.- When I set BOTH WP_SITEURL and WP_HOME to
https://my-site.co.jp/sub-directory, the filters and sort buttons load and work perfectly. - As soon as I revert the configuration to the desired structure (
WP_SITEURLin the subdirectory,WP_HOMEin the root), the 404 error reappears.
This indicates that uListing is not correctly resolving its API endpoints when WordPress is run from a subfolder while the site is served from the root.4. Request for Assistance
Could you please advise on how to properly configure uListing to handle this subdirectory installation?
- Is there a specific setting within uListing (e.g., in Advanced Settings) to override the API Base URL?
- Is this a known bug in uListing when using a different WP_HOME and WP_SITEURL?
Thank you for your time and assistance in resolving this issue.
Best regards,
- The plugin is incorrectly including the segment
The topic ‘UListing API 404 Error when WordPress is installed in a Subdirectory (Different’ is closed to new replies.