• Resolved webomg

    (@webomg)


    Hopefully someone can shed some light on an issue I’m having with a WooCommerce plugin update.

    I am running on php7 and WordPress Version 5.9

    I am running into an error that requires me to restore the website from backup after attempting a WooCommerce plugin update. The error that show up on the logs is .env File does not exist.

    ****
    [Sun Feb 06 19:17:02 2022] [error] [client xx.xxx.xxx.xxx] File does not exist: /var/www/vhosts/federalsemiconductors.com/httpdocs/.env
    ****

    I should be able to provide any other information to help if needed.

    Thanks for the help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • @webomg

    This seems like an issue with your host server files. Could you reach out to your host support for further help?

    Thread Starter webomg

    (@webomg)

    I know there is an issue, I’m trying to get more details about what the issue might be. “issue with your host server files” is too vague to do anything with. If I check any other WordPress install on the same server, none have that hidden file.

    Plugin Support Sérgio L. a11n

    (@csnlima)

    Hi @webomg,

    They should be able to point you the right direction if you provide the error you’re seeing.

    If your host need more information from WooCommerce side, please let us know.

    Best,

    Thread Starter webomg

    (@webomg)

    All they going to do is point me back to the error log and tell you to troubleshoot the application.

    Maybe you don’t have lots of experience with hosting companies or hosting servers but an application error on the domain level is not their problem, it has nothing to do with the hosting server, not for this type of error.

    Hi @webomg!

    To know more about your setup and to further check into this, kindly provide us your System Status; you can find it via WooCommerce > Status. Select ‘Get system report’ and then ‘Copy for support’. Once you do this, paste in here your response.

    Thanks!

    Thread Starter webomg

    (@webomg)

    Thanks Juan,

    I copied the system report here. The one thing I’m thinking might be the issue is that’s its on a development environment so its dev.federalsemiconductors.com compare to federalsemiconductors.com, not sure if that’s the issue and maybe the update will go through once the site is live but still even if that’s the case I would like to know how to update it under a development environment. I never run into that before and all the sites we build are done under development environment first before they go live so i’m not 100% sure that its whats causing the problem.

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://dev.federalsemiconductors.com
    Site address (URL): https://dev.federalsemiconductors.com
    WC Version: 5.7.1
    REST API Version: ? 5.7.1
    WC Blocks Version: ? 5.7.2
    Action Scheduler Version: ? 3.2.1
    WC Admin Version: ? 2.6.5
    Log Directory Writable: ?
    WP Version: 5.9
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.25
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.19.7
    NSS/3.44
    
    SUHOSIN Installed: –
    MySQL Version: ? 5.5.61-log - We recommend a minimum MySQL version of 5.6. See: WordPress requirements
    Max Upload Size: 8 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 5.7.1
    WC Database Prefix: vpb3VQy_
    Total Database Size: 174.00MB
    Database Data Size: 160.24MB
    Database Index Size: 13.76MB
    vpb3VQy_woocommerce_sessions: Data: 0.36MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    vpb3VQy_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_woocommerce_order_itemmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    vpb3VQy_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_actionscheduler_actions: Data: 3.52MB + Index: 3.69MB + Engine InnoDB
    vpb3VQy_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_actionscheduler_logs: Data: 1.52MB + Index: 0.56MB + Engine InnoDB
    vpb3VQy_cli_cookie_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_cli_cookie_scan_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_cli_cookie_scan_cookies: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_cli_cookie_scan_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_cli_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    vpb3VQy_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_options: Data: 5.48MB + Index: 0.16MB + Engine InnoDB
    vpb3VQy_postmeta: Data: 117.52MB + Index: 7.02MB + Engine InnoDB
    vpb3VQy_posts: Data: 28.52MB + Index: 0.81MB + Engine InnoDB
    vpb3VQy_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_css_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_revslider_navigations: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_revslider_sliders: Data: 0.25MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_sliders_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_slides: Data: 1.52MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_static_slides: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_term_relationships: Data: 0.23MB + Index: 0.19MB + Engine InnoDB
    vpb3VQy_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    vpb3VQy_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    vpb3VQy_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    vpb3VQy_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    vpb3VQy_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    vpb3VQy_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    vpb3VQy_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    vpb3VQy_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 96
    cookielawinfo: 6
    custom_css: 1
    customize_changeset: 71
    elementor_library: 57
    litho-mega-menu: 18
    nav_menu_item: 354
    page: 205
    portfolio: 20
    post: 26
    product: 1506
    revision: 1201
    sectionbuilder: 127
    shop_order: 18
    wp_global_styles: 1
    wpcf7_contact_form: 5
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (11) ###
    
    FiboSearch - AJAX Search for WooCommerce: by FiboSearch Team – 1.16.0
    Contact Form 7: by Takayuki Miyoshi – 5.5.4
    GDPR Cookie Consent: by WebToffee – 2.0.9
    Duplicate Page: by mndpsingh287 – 4.4.8
    Elementor: by Elementor.com – 3.5.5
    Litho Addons: by Themezaa Team – 1.2
    OMG Custom For Federal SemiConductors: by Julian Fernandez – 1.0
    Perfect Brands for WooCommerce: by QuadLayers – 2.0.5
    Slider Revolution: by ThemePunch – 6.5.6
    WooCommerce: by Automattic – 5.7.1 (update to version 6.1.1 is available)
    YITH WooCommerce Request A Quote Premium: by YITH – 3.8.0
    
    ### Inactive Plugins (3) ###
    
    Duplicator: by Snap Creek – 1.4.4
    Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5
    WooCommerce Load More Products: by BeRocket – 1.1.9.4
    
    ### Dropin Plugins (1) ###
    
    maintenance.php: maintenance.php
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #31662 - /shop/
    Cart: #31663 - /cart-2/
    Checkout: #31664 - /checkout-2/
    My account: #31665 - /my-account/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Litho Child
    Version: 1.2
    Author URL: https://www.themezaa.com/
    Child Theme: ?
    Parent Theme Name: Litho
    Parent Theme Version: 1.2
    Parent Theme Author URL: https://www.themezaa.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: litho/woocommerce/archive-product.php
    litho/woocommerce/cart/mini-cart.php
    litho/woocommerce/content-product.php
    litho/woocommerce/content-single-product.php
    litho/woocommerce/single-product/meta.php
    litho/woocommerce/single-product/product-image.php
    
    ### Action Scheduler ###
    
    Pending: 12,236
    Oldest: -0001-11-30 00:00:00 +0000
    Newest: 2022-02-07 18:21:05 +0000
    
    ### Status report information ###
    
    Generated at: 2022-02-07 19:39:00 +00:00
    

    Hi @webomg! How’s it going today?

    The one thing I’m thinking might be the issue is that’s its on a development environment

    This is (probably) the correct reason for that error! Chances are that this isn’t related to WooCommerce, but AFAIK, this error happens when the URL in your .env file doesn’t match the exact URL you’re trying to access your site from.

    It’s hard to say if you can do that in your test environment, but if possible, you can try to change your APP_URL field to dev.federalsemiconductors.com or federalsemiconductors.com.

    I’d recommend checking out with your hosting company for the best practices about that, as my colleagues mentioned above! ??

    Let us know how it goes!

    My very best,

    Thread Starter webomg

    (@webomg)

    But that’s the issue, there is no .env file so updating it is not an option.

    I don’t understand why WooCommerce is looking for that file in the first place. I though maybe its a new requirement but I can’t find online anywhere it says you need to create a .env file now for WooCommerce.

    Also, I don’t see how a development environment should have anything to do with this, its something I’ll need to try when going live I guess but it just doesn’t make any sense. That would be like saying you can’t install WooCommerce on a subdomain.

    Hey @webomg!

    How’s your development environment been set? Are you using docker? Since the file doesn’t exist, I’d give it a try and create/upload a .env file to see how it goes!

    Thanks

    Thread Starter webomg

    (@webomg)

    Hi Andre,

    We are not using docker, its just a subdomain that we are building the website on and once its done we just use duplicator to move the site over to the root domain. On a new website setup we found it to be the easiest way to go about it. On existing website where we have to keep the db info we take a different method but its not in this case.

    So its really just a new install for a new website under a new subdomain, nothing special.

    Yeah, we can create the .env file but I was trying to understand why its requiring that to make sense of it first before attempting to create the file. Mind you, this file as far as I know does not get created on its own with WooCommerce install and I don’t think its required so its strange its requiring it on this update.

    Mirko P.

    (@rainfallnixfig)

    Hi @webomg,

    I understand that you’re getting an error when you try to update your WooCommerce core plugin currently version 5.7.1.

    Have you tried accessing your /wp-content/plugins/ directory using FTP, deleting woocommerce folder, and copying/pasting there a fresh copy of WooCommerce? You can download the zip file from this URL.

    After checking your system status a couple of things come up for you to consider.

    1. PHP Version: 7.3.25 and MySQL Version: ? 5.5.61 are outdated and these are the server requirements we recommend to run the WooCommerce core plugin:

    https://woocommerce.com/document/server-requirements/#section-2

    2. Your Action Scheduler shows Pending Actions: 12,236 and while WP-Cron is enabled it doesn’t seem to be running correctly as actions should be automatically executed on every page load. So, I’d suggest that you check this with your hosting provider to make sure there is nothing blocking Cron from running cron jobs.

    Cheers.

    Thread Starter webomg

    (@webomg)

    Thanks Mirko for that last response, that was enough clues for me to work with and resolve the issue.

    I did end up downloading the latest version of WooCommerce and uploaded it via ftp. I replaced the WooCommerce folder with the new one and that seemed to have worked, the WooCommerce plugin was now updated to the latest version but that actually resolved the issue by doing it manually and not by updating the plugin directly from the Admin so I presumed it was only a temporary fix. I decided to take a break from that and look into your other comments. MySql and PHP versions didn’t seem to be getting in the way but the crons not running was something I was more concerned with. I started looking into the server but WP-Crons was not restricted. After doing some searching online and reading some posts I realized that our http authentication was getting in the way of the cron jobs from running(that username and password box that comes up when trying to enter the website). When I looked into WooCommerce it had 30493 pending cron jobs in which I could run manually but not via WP-Cron automation.

    What I Ended Up doing:
    I restored the website back to before the manual update of the WooCommerce plugin and disabled the http authentication on the website, I then run an update on WooCommerce and everything worked just fine ??

    I looked in the logs and no more of those .env file does not exist errors, I also didn’t find that file on the domain. So I realize now that WooCommere in general or at least this version or this specific update can’t fully run successfully with http authentication in the way and in regards to the .env file, I can only assume but not 100% sure that the file gets created temporarily during the update and gets removed afterwards.

    If I could just recommend, I think WooCommerce should have another step to add it its prerequisite check list prior to running the update via the Admin. It would be useful for WooCommerce to return an error or some sort of a notice prior to attempting the update that http Authentication should be disabled prior to running the update instead of attempting to do so and crashing the website.

    I appreciate all the help, learned something new ??

    thx!

    • This reply was modified 3 years, 1 month ago by webomg.
    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    That’s awesome! Thanks for sharing your fix with the community and for sharing your feedback. We greatly appreciate it!

    If you have any further questions, I recommend creating a new thread.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘.env File does not exist on WooCommerce update’ is closed to new replies.