WordPress.org

Ready to get started?Download WordPress

Forums

Error 404 after login to development site (13 posts)

  1. jennsweb
    Member
    Posted 4 years ago #

    I have been trying to develop a wordpress site for another design company and they wanted me to develop on a subfolder of their own site for the client. Made that work by putting the url in the wp-config.php file.

    Now it's time to install the new site and their protocol involves creating the developed site in a url that they will then program the client's site's DNS to point to upon completion. This is what the url looks like:
    http://12.345.678.910/$sitepreview/clientsite.com

    THEN, on their cpanel, apparently there is a one-button install of WP that only allows you to install WP in a subfolder of the site. (the cpanel installs I've done usually allowing you to install it at the root/ ). So, in order to login, I need to go to the above url, add /wordpress/wp-login.php to the end and then I get the login screen. When I enter the login info, I then get an error 404.

    As a subcontractor, I don't get access to the cpanel and the reason I was hired was that I have used WP for many other clients, but their development configuration is making things really interesting. Any ideas on if this will even work or why I am getting the Error 404 after login?

  2. dtiger2k
    Member
    Posted 4 years ago #

    I would suggest that you might ask them to create an FTP account for you until the project is completed. You can then upload and install wordpress into the root directory. If you do it this way you will need the database information for the install.

  3. s_ha_dum
    Member
    Posted 4 years ago #

    When I enter the login info, I then get an error 404.

    Sounds like your siteurl and/or home setting in wp_options is incorrect.

    A bit weird that you can access the server on which you are installing. That's crippling.

  4. jennsweb
    Member
    Posted 4 years ago #

    I am able to use FTP via Dreamweaver and connect with the server. They don't want to give me access to the cpanel though.

    Are there any other places where I need to correct the url besides wp-options?

    Thanks!

  5. s_ha_dum
    Member
    Posted 4 years ago #

    If you have any content-- posts, uploaded images, things like that-- that need to be retained you may have to search and replace the DB.

  6. Samuel B
    moderator
    Posted 4 years ago #

    As a subcontractor, I don't get access to the cpanel

    that is sort of nuts - handicap you then expect you to crap a miracle?

  7. dtiger2k
    Member
    Posted 4 years ago #

    Check out this tutorial, I think it might help in your case.

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Also, I know you may have already thought of this but ftp using filezilla or another ftp program can make this easier as well. I use it and dreamweaver hand in hand and once the database is setup those two are really all you need to build your site.

    Oh, and just remember to write down or print the information from the wp-config.php file, even back it up to your computer so that if needed you can start from scratch without needing cpanel access.

  8. jennsweb
    Member
    Posted 4 years ago #

    Update:

    I tried to add the full url under where it says "define('DB_HOST', 'localhost');

    I added define('WP_HOME', 'fullurlofsite/wordpress'); and the same for define('WP_SITEURL',) and re-uploaded wp-config.php to the server.

    Now I at least get a normal looking login page when I go to
    http://12.345.678.910/$sitepreview/clientsite.com/wordpress/login.php but then when I try to login I am still getting an Error 404 page.

    How would I edit options.php?

  9. s_ha_dum
    Member
    Posted 4 years ago #

    Why do you think you should be editing options.php?

  10. jennsweb
    Member
    Posted 4 years ago #

    Then where is the wp_options that you suggested I edit the home and/or site url settings in?

  11. jennsweb
    Member
    Posted 4 years ago #

    Just an update:

    I now see the default home page when I go to this site's url, but then after I try to log in, the url switches to one that is missing the dollar sign in front of the words "sitepreview" and this is causing that error 404. Is there some place where you can customize the url of the dashboard?

    Thanks for the help so far! We're getting close...

  12. Samuel B
    moderator
    Posted 4 years ago #

  13. s_ha_dum
    Member
    Posted 4 years ago #

    Then where is the wp_options that you suggested I edit the home and/or site url settings in?

    Those values are stored in the database. The edit you made to wp-config overrides those values. So, basically, you've already changed them.

    ... but then after I try to log in, the url switches to one that is missing the dollar sign in front of the words "sitepreview" and this is causing that error 404.

    I didn't realize that you needed the dollar sign. I thought you were using that as a placeholder for the real directory name. Okay. According to this article the function responsible is clean_url() in wp-includes/formatting.php. clean_url() calls a filter named clean_url. Maybe you can use that filter to solve your problem. I'm not sure about that as I haven't tried. Or just edit the core file-- you'll hate yourself every time you upgrade-- as the article explains. I haven't tried that either, by the way.

Topic Closed

This topic has been closed to new replies.

About this Topic