• 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:
    https://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?

Viewing 12 replies - 1 through 12 (of 12 total)
  • 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.

    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.

    Thread Starter jennsweb

    (@jennsweb)

    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!

    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.

    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?

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

    https://codex.www.ads-software.com/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.

    Thread Starter jennsweb

    (@jennsweb)

    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
    https://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?

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

    Thread Starter jennsweb

    (@jennsweb)

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

    Thread Starter jennsweb

    (@jennsweb)

    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…

    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Error 404 after login to development site’ is closed to new replies.