I installed wordpress in /wp/
directory. So in my blog every URL had /wp/
in it. I followed multiple articles(1,2) and was able to remove the 'wp' from URLs.
before - example.com/wp/post-1-name
after - example.com/post-1-name
In permalink settings I have selected -
post name - http://example.com/sample-post/
Now every url I open do not have /wp/
in it. Except front page.
In 'reading settings' I also set the 'front page display' to 'a static page' and selected lets say 'Introduction' as the front page.
When I open urls in browser all urls except home page (example.com) works fine but when I open homepage or click on the page url of "introduction" page (which is static front page), a message is shown -
This Website is Under Construction.
Come Back Soon.
Going to http://example.com/wp/
shows 'not found' page.
In my general settings -
WordPress Address (URL) -> http://example.com/wp
Site Address (URL) -> http://uptuplacements.com
Index.php file content in root public_html
directory.
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
Content of index.php file in public_html/wp/
directory:
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
content of .htaccess file in root public_html
directory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
content of .htaccess file in public_html/wp/
directory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any suggestions how can I load the front page on home url?
1 https://codex.wordpress.org/Changing_The_Site_URL
2 http://www.wpbeginner.com/wp-tutorials/how-to-get-rid-of-wordpress-from-your-wordpress-site-url/