Title: public_html &#8211; direct link
Last modified: August 24, 2016

---

# public_html – direct link

 *  Resolved [mike.raab](https://wordpress.org/support/users/mikeraab/)
 * (@mikeraab)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/)
 * Hey folks,
 * I’ve installed WordPress on many websites and never had a problem before but 
   now one showed up.
 * Some months ago I’ve installed wordpress on a customers website, let’s call it
   mysite.com. If you want to access the website via mysite.com, you’ll get a 403-
   Forbidden message, but if you type in mysite.com/public_html the site will load.
   In the backend under settings/general settings there is a point for changing 
   the URL I suppose, but it’s greyed out.
 * Do I have to move my WordPress installation? I’m using a custom theme on which
   I’ve done some modifications, if that’s any important.
 * Cheers and happy easter,
    Mike

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5980964)
 * You might want to try changing the site address/url to revert it back to your
   preferred choice: [https://codex.wordpress.org/Changing_The_Site_URL](https://codex.wordpress.org/Changing_The_Site_URL)
 * Also, as the Settings >> General fields are greyed out, check in the wp-config
   file to see if the **/public_html** address has been hardcoded there.
 * Happy Easter too 🙂
 *  Thread Starter [mike.raab](https://wordpress.org/support/users/mikeraab/)
 * (@mikeraab)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5980973)
 * I’ve checked wp-config, it’s indeed hardcoded in there, but changing it doesn’t
   do much – changing wp_siteurl resticts me from entering the backend and wp_home
   doesn’t do anything at all.
 * Again, my directory looks as follows:
    /public_html/—all the wordpress files—
 * Should I try to move all my wordpress files to the root directory? What about
   changing links which may occur in the database or in the programming?
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5980974)
 * I don’t think you need to move the WordPress file from inside /public_html/
    
   They should be fine there. I would remove the hardcoded elements from wp-config.
   php and [define the url directly in the database](https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database).
 *  Thread Starter [mike.raab](https://wordpress.org/support/users/mikeraab/)
 * (@mikeraab)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981253)
 * I’ve changed the database entries and trying to access my website results in 
   a “Forbidden – You don’t have permission to access / on this server” message.
 * Any ideas?
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981254)
 * I would say check the permissions on the public_html directory, but it seems 
   that the site has already been running fine with the files there from what you
   have explained above. Perhaps this explains why the site address/url were hardcoded
   in wp-config – you have removed these, right 🙂
 * Would it be worth reaching out to the host at this point?
 *  Thread Starter [mike.raab](https://wordpress.org/support/users/mikeraab/)
 * (@mikeraab)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981255)
 * I have removed the hardcoded lines in wp-config.php. These entries can now be
   changed in the backend.
 * The webspace is only used for this website, should I try to relocate my wordpress
   installation to the root directory?
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981262)
 * I don’t think there is any use in placing your site files inside /home/, as usually
   access here is restricted to FTP and File Manager, and for directories and files
   that manage mail, cPanel (or other), passwords, etc.
 * I manage two sites where the structure is /home/public_html/[Wordpress files]
   
   In both of these sites the site address/url points to [http://site-name.com](http://site-name.com)
   without any issues.
 * As far a the terminology goes, I would say that inside the /public_html/ directory*
   is the root*, and above it is, well, one level above the root.
 * Have you checked to see where the DNS records are pointing to for [http://www.your-site.com](http://www.your-site.com)?
 *  Thread Starter [mike.raab](https://wordpress.org/support/users/mikeraab/)
 * (@mikeraab)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981265)
 * I got the solution!
 * I’ve copied the files .htaccess and index.php from the folder where wordpress
   is installed (in my case public_html) and pasted them into the root directory.
   Then I’ve changed a line in index.php:
 * from
    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
 * to
    require( dirname( __FILE__ ) . ‘/public_html/wp-blog-header.php’ );
 * Now everything works like a charm.
 * Thank you for your help!
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981266)
 * Fantastic. Great to hear it was resolved without needing to get in touch with
   the host 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘public_html – direct link’ is closed to new replies.

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [public_html](https://wordpress.org/support/topic-tag/public_html/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [barnez](https://wordpress.org/support/users/pidengmor/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/public_html-direct-link/#post-5981266)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
