Issues with Wordpress Installation

Discussion in 'Installation/Configuration' started by Falrish, Sep 8, 2020.

  1. Falrish

    Falrish Member

    Trying to get a wordpress site up and running. I have set up a new site from a new user on the system, and it keeps trying to read from the main site on the server.
    Site setup is /client6/web11/ and it keeps trying to read from /client4/web4/ thoughts on how to fix this issue?
    I can load files just fine, it is only when I am using PHP calls that this is happening.
    I have set the site up under a couple different users, and it keeps having this issue. The site is running WordPress, which a few others are as well, but this one is the only site that is acting up.
     
    Last edited: Sep 8, 2020
  2. nhybgtvfr

    nhybgtvfr Active Member

    what do you mean by this?
    you can see plain html files from that site ok? you can upload files ok using ftp/sftp/ftps/scp? something else?
    do you have ssl on the site? and on the site owned by /client4/web4? any other sites?

    have you set an ip for the site in ispconfig? or is it configured as *?
    what php handler is the site set to use? and the site that is being shown?
     
  3. Falrish

    Falrish Member

    Yes I can display HTML just fine.
    Yes, I have no issues with uploading files via SFTP/SCP.
    No to all of these questions.
    All sites on the server are set to a specified IP address. None are running off *.
    Both are running on PHP-FPM
     
  4. nhybgtvfr

    nhybgtvfr Active Member

    what is the url for this site? and for the main site that gets displayed instead?
     
  5. Falrish

    Falrish Member

    The site I am working on is http://www.survivaluo.com/

    The issue is not that another site is being displayed, it is that the server is trying to use a file from the other site to load the database in WordPress. I have other sites on the same server running wordpress without an issue though.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Wrong website shown is common error. Search this forum with Internet Search Engines. For example:
    Code:
    site:howtoforge.com wrong website shown
     
  7. Falrish

    Falrish Member

    The issue is not that another site is being displayed, it is that the server is trying to use a file from the other site to load the database in WordPress. I have other sites on the same server running wordpress without an issue though.
     
  8. nhybgtvfr

    nhybgtvfr Active Member

    the server can't do that. wordpress will always look for wp-config.php in it's base folder.

    if you want wp-config.php in another location eg, in the private folder, you can move it, and create a new wp-config.php file in the root of wordpress with the contents:
    Code:
    <?php
    include __DIR__ . '../../private/wp-config.php';
    ?>
    
    but it won't have permission to access a file within another websites folder structure.

    how have you determined it's trying to load from /client4/web4? just by what's displayed when you try to access the wordpress site?
    anything in the logs?
    i assume the main site is also a wordpress site? did you maybe copy the wp-config.php for this site over from the main site and forget to change the db access details, or the wordpress prefix if they both use the same database?
     
  9. Falrish

    Falrish Member

    I know it is not. However, that is what the server is trying to do. not sure why it keeps trying to pull from the client4/web4 directory, but even with a fresh install and a fresh client setup it is STILL doing it on ONLY this site.
    Code:
    [Tue Sep 08 11:44:45.366199 2020] [:error] [pid 28135] [client 216.221.82.172:34644] 
    FastCGI: server "/var/www/clients/client6/web11/cgi-bin/php-fcgi-104.152.210.37-80-www.survivaluo.com" stderr: 
    PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. 
    File(/var/www/clients/client4/web4/web/wp-config.php) is not within the allowed path(s): 
    (/var/www/clients/client6/web11/web:/var/www/clients/client6/web11/private:/var/www/clients/client6/web11/tmp:/var/www/www.survivaluo.com/web:/srv/www/www.survivaluo.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) 
    in /var/www/clients/client4/web4/web/wp-load.php on line 34
     
  10. nhybgtvfr

    nhybgtvfr Active Member

    can you post a screenshot of the ispconfig web-domain domain tab settings for that site, and for the main site.
     
  11. Falrish

    Falrish Member

    [​IMG]
    Code:
    Issue Site
    [​IMG]
    Code:
    Main Site
     
    Last edited: Sep 10, 2020
  12. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    A fresh install of wordpress? or a fresh load of your existing wordpress site backup?

    You can find references to full path names in the database (perform a db dump and search for those), in .htaccess files, in .user.ini files, and hard-coded in php files or files included by php, eg. .inc (do a recursive search of the whole web/ directory for the old path to find those references).

    Also you did not specifically reply to this earlier question, which is another possibility:
     
  13. Falrish

    Falrish Member

    The new server is a fresh install of wordpress, with a new database, that I then imported the information into after set-up.
    there is no .htaccess file information pointing for path.
    There is no user.ini file pointing to a path.
    There is no hardcoded PHP that would point it to /var/www/client4/web4 from /var/www/client6/web11.

    The wp-config.php file was created by the automatic installer. However, it got stuck in an endless loop because after making the file in /var/www/client6/web11/web it then proceeded to attempt to read/write the file in /var/www/client4/web4/web which is where I am TOTALLY lost.
    They also use totally different databases.
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you also checked the database does not contain that path?
    Have you checked the wordpress settings wp_siteurl and wp_home? Either from database contents or from Wordpress settings?
     
  15. snowweb

    snowweb Member

    Did you create a DNS Zone file and an 'A' record for the domain? I don't think ISPConfig does this automatically for each new site and if a A record is missing for the domain, I think it is possible that another domain on the server may be shown (I read some time ago about an issue like that on ISPConfig - I think it was in the bug tracker).
     
  16. nhybgtvfr

    nhybgtvfr Active Member

    do you mean you imported an existing database backup back into this new wordpress database? or that you imported the config information into wp-config.php, or you imported wordpress pages/posts using the wordpress backend?

    for the 1st one, you may, as already stated, have wrong filepaths, or home/site url's in the database.

    i would suggest trying a new clean manual wordpress install, (with a newly created blank database in ispconfig), by just uploading the files to the /web folder, and then manually moving wp-config-sample.php to wp-config.php and then manually editing that file with the new database details (db should still be blank at this point). and then browse to the site and complete the install process.
    see if the new wordpress install loads and works fine on the site then. try logging into the backend and adding a plugin, changing the theme etc.
    if that all works then the problem is either in the database/data import(/wp-content restore?), or some issue during the automated install.
    then run your data import, if that breaks it, then it would appear the issue is confined to some erroneous data in the database/data import.

    from this though:
    i suspect the issue is either with the config settings, or the auto install process. i only see broken img tags for the screenshots you tried posting though, so can't see if there's anything obviously wrong there.[/quote][/quote]
     
  17. Falrish

    Falrish Member

    Yes I have.
    This was a fresh database install with the posts uploaded into the system. no other database entries were altered from the installation.

    The system was working 100%, including all DNS records until the ISP restarted the VM.

    This was a fresh database install with the posts uploaded into the system. no other database entries were altered from the installation.

    I will see if I can fix the IMG tags again to view. I do not understand this issue, as I have worked with this system for a long time and this has never happened when I add new sites to the server.
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The wrong file paths have to come from somewhere. They are either in the files hardcoded paths or in database as values for configuration variables or page contents. Are you really really sure you have checked all of those?
     
  19. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    So it sounds like the issue comes in when you import your old posts? You said you checked that the database does not contain the old path - I suspect your check was not complete or not correct. You could probably just dump the wordpress database and search it for 'web4' and likely will find the issue (assuming you did not import any other files along with the posts).
     

Share This Page