0

I've already read this and followed the steps, however I can't get it work yet.

  • My Wordpress URL: http://mydomain.com/web (this is where it's installed)
  • My Site URL: http://mydomain.com

I've copied index.php and .htaccess to /public_html which is the root directory.

/.index.php

<?php
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . 'web/wp-blog-header.php' );

/web/index.php

<?php
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . 'wp-blog-header.php' );

/.htaccess (the same as /web/.htaccess)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php [L]
</IfModule>
# END WordPress

I can still access to my admin page on http://mydomain.com/web/wp-admin, but Wordpress content media isn't recognized yet because I once changed "wp-content" folder name to "media" (using iThemes Security plugin) and this to wp-config.php

/web/wp-config.php

<?php
define( 'WP_CONTENT_URL', 'http://mydomain.com/web/media' );
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/web/media' );

So, media (plugins, themes, language) isn't recognized.

I've tried with http://mydomain.com/wp-admin and it doesn't redirects me to http://mydomain.com/web/wp-admin either.

1 Answer 1

1

Looks link you're missing the forward slash / which is probably causing it to not locate the right files

/.index.php

<?php
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . '/web/wp-blog-header.php' );

/web/index.php

<?php
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

/.htaccess (the same as /web/.htaccess)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php [L]
</IfModule>
# END WordPress

/web/wp-config.php (delete what you have and replace with this right above the thats all part )

define('WP_CONTENT_FOLDERNAME', 'media');
define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME );
define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/' . WP_CONTENT_FOLDERNAME );

/* That's all, stop editing! Happy blogging. */

2
  • The last part I just like to use but you don't have to Commented Jun 9, 2014 at 0:48
  • You were right about the slash! however, media isn't recognized :/ Commented Jun 9, 2014 at 2:09

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.