Skip to content
wiki.fftac.org

Localizedhomediagnostics - Source Excerpt 02

Back to Localizedhomediagnostics

Summary

This source excerpt preserves a bounded section of Antichrist.net/wp-content/plugins/uaix-locale-router/src/Diagnostics/LocalizedHomeDiagnostics.php so readers can inspect the evidence without opening the full source file.

**Source path:** Antichrist.net/wp-content/plugins/uaix-locale-router/src/Diagnostics/LocalizedHomeDiagnostics.php

'fix_steps'                    => self::localized_home_fix_steps(),
			'htaccess_status'              => $htaccess_status,
			'rewrite_block'                => Plugin::htaccess_manual_block(),
			'checked_at'                   => time(),
		);

		set_transient( 'uaixlr_localized_home_check', $result, 5 * MINUTE_IN_SECONDS );

		return $result;
	}

	/**
	 * Return deployment steps for localized-home routing issues.
	 *
	 * @return array
	 */
	public static function localized_home_fix_steps() {
		return array(
			__( 'Open Settings > Permalinks and click Save Changes once so WordPress refreshes its rewrite rules.', 'uaix-locale-router' ),
			__( 'Open UAIX Locale Router > Status and use Repair .htaccess if automatic repair is available for this server.', 'uaix-locale-router' ),
			__( 'Remember that the upload package itself does not include the site-root .htaccess file. UAIX Locale Router can repair it automatically only when WordPress has permission to write that file.', 'uaix-locale-router' ),
			__( 'If automatic repair is not available, edit the site-root .htaccess file in the same folder as wp-admin, wp-content, and index.php. Do not put rewrite blocks inside wp-content, the plugin folder, or a subdirectory.', 'uaix-locale-router' ),
			__( 'If .htaccess is not visible, enable Settings > Show Hidden Files (dotfiles) in File Manager. If the file does not exist yet, create it in the site root.', 'uaix-locale-router' ),
			__( 'If cPanel says the file already exists when you try to create .htaccess, that means the file is already there but hidden. Turn on hidden files and edit the existing file instead.', 'uaix-locale-router' ),
			__( 'If the site redirects into /en-us/ and then shows a server 404, check whether the # BEGIN WordPress block is incorrectly targeting /en-us/index.php instead of the site-root /index.php and refresh that block too.', 'uaix-locale-router' ),
			__( 'If .htaccess already has UAIX Locale Router or WordPress marker blocks, replace those marker sections instead of adding duplicates.', 'uaix-locale-router' ),
			__( 'On Apache or LiteSpeed, make sure the UAIX Locale Router and WordPress blocks are active there so locale-prefixed and REST pretty URLs are forwarded to /index.php.', 'uaix-locale-router' ),
			__( 'Re-test the localized homepage URL shown below. It should return a WordPress response instead of a server-level 404.', 'uaix-locale-router' ),
			__( 'If the site is behind a proxy or CDN, confirm the configured home URL scheme and forwarded HTTPS headers are correct so locale redirects stay on https://.', 'uaix-locale-router' ),
		);
	}
}