3

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.

enter image description here

Going to http://example.com/wp/ shows 'not found' page.

enter image description here

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/

3
  • 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. 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/… Commented Oct 1, 2016 at 13:49

1 Answer 1

2

Finally 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/

2
  • Even after looking at it, I have no idea what it means.
    – takeone
    Commented Jun 13 at 9:07
  • can you edit this answer to explain what you mean by "conflicting"? It's unclear to a lot of people
    – Tom J Nowell
    Commented Jun 13 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.