admin管理员组文章数量:1122846
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/wp/post-1-name
after - example/post-1-name
In permalink settings I have selected -
post name - /
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) 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 /
shows 'not found' page.
In my general settings -
WordPress Address (URL) ->
Site Address (URL) ->
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
2 /
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/
- The "under construction" banner is loaded somehow by uptuplacements.com/index.php. Are you sure you followed the instructions by wp-beginner to upload a modified index.php file to the root directory of your wordpress site (not to /wp/)? – adelval Commented Oct 1, 2016 at 10:51
- Yes I followed the instructions by wp-beginner. updating the question. – Anurag Rana Commented Oct 1, 2016 at 12:48
- I think "under construction" is loaded from your root index.php file try to find your root index.php file and update index.php with upper code that you mention. also have a look [askwpgirl.com/… – Amit Mishra Commented Oct 1, 2016 at 13:49
1 Answer
Reset to default 2Finally solved the issue.
Index.html
file in /public_html/
directory was conflicting with index.php
file.
This awesome article solved the issue.
askwpgirl.com/moving-wordpress-from-subdirectory-to-root-faq/
本文标签: migrationUnable to load static front page on home url
版权声明:本文标题:migration - Unable to load static front page on home url 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303879a1932036.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论