Issue with website updates from localhost MainWP

Hi,
I moved my MainWP dashboard to a localhost install for security and performance reasons. For the most part, it seems to be working OK, but there’s one issue I haven’t been able to figure out. If I attempt to “update selected plugins” (or themes), I get the popup listing the sites to be updated and the progress, but it doesn’t show any of the updates completing. The updates actually do happen (at least for the first n sites that were triggered immediately), and the dashboard shows that if I close the update popup, but the problem is with the progress indicators in the popup itself.

I know that there are some limitations to running the dashboard on localhost where it cannot be reached from the public Internet, but I don’t think this is supposed to be one of them. Does anyone have any suggestions for how I can debug this issue?

I am running nginx and php 8.2, MySQL 8.1, WordPress 6.4.2. I am not seeing any meaningful issues in the “Info” section of the plugin, though I can paste the system report if it’s helpful.

Thanks

Hey @kgourlay

We haven’t observed any visual issues with progress bars when running MainWP in localhost environment.

Can you please share some screenshots or a screen recording if possible?

Have you tried a different browser, and possibly in an Incognito/Private browser window without any browser extensions running?

Sure, I just tried Chrome and got the same behavior. Below is a screenshot taken a couple minutes after I clicked “Update Selected Plugins.” This modal pops up as the updates begin, but no progress seems to ever show up. It just sits there and spins. But, if I check the sites independently I see that the updates actually did complete.

I thought it might be an issue with REST API because I had some warnings related to that earlier. I learned that requires a slightly different configuration with nginx than with ols which I was running before, but I think I got that sorted out, at least as far as I can tell with the built-in checks that REST API is functioning.

Thanks for the additional details.

I couldn’t reproduce it in my localhost setup.

What software are you using for your setup?

Can you try other MainWP themes and see if that helps?

Finally, can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Info → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

Also, please include the system report for the Child Site in question by navigating to MainWP Child > System Information and clicking the Blue button.

Bojan,
Thanks for taking a look. A quick update: I noticed that I have a child site on localhost (same server as the MainWP dashboard) and that one indicated a completed update when I requested a set of updates that included it.


### WordPress Check                Required                                               Detected                                     Status   ###

FileSystem Method                  = direct                                               direct                                       Pass        
MultiSite Disabled                 =true                                                  true                                         Pass        
WordPress Memory Limit             >=64M                                                  256M                                         Pass        
WordPress Version                  >=6.2                                                  6.4.2                                        Pass        

### PHP                            Required                                               Detected                                     Status   ###

cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          60                                           Warning     
cURL Version                       >=7.29.0                                               8.4.0                                        Pass        
OpenSSL Version                    >=OpenSSL/1.1.0                                        (SecureTransport) OpenSSL/3.1.4              Warning     
OpenSSL Working Status             Yes                                                    Yes                                          Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Allow URL fopen                N/A                                                    YES                                                      
PHP Disabled Functions             N/A                                                    No functions disabled.                                   
PHP Exif Support                   N/A                                                    YES                                                      
PHP IPTC Support                   N/A                                                    YES                                                      
PHP Loaded Extensions              N/A                                                    Core, FFI, PDO, PDO_ODBC, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, random, readline, session, shmop, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib            
PHP Max Execution Time             >=30 seconds                                           30                                           Pass        
PHP Max Input Time                 >=30 seconds                                           60                                           Pass        
PHP Memory Limit                   >=256M                                                 256M                                         Pass        
PHP Post Max Size                  >=2M                                                   8M                                           Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Upload Max Filesize            >=2M                                                   2M                                           Pass        
PHP Version                        >=7.4                                                  8.2.12                                       Pass        
PHP XML Support                    N/A                                                    YES                                                      
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        

### MySQL                          Required                                               Detected                                     Status   ###

MySQL Client Encoding              N/A                                                    utf8mb4                                                  
MySQL Mode                         N/A                                                    NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION            
MySQL Version                      >=5.0                                                  8.1.0                                        Pass        

### Server Configuration           Detected Value                                      ###

Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset Content             N/A                                                    
Architecture                       64		 bit                                               
Gateway Interface                  CGI/1.1                                                
HTTPS                              OFF                                                    
Memory Usage                       6.93 MB                                                
Operating System                   Darwin                                                 
Request Time                       1704344279                                             
Server Protocol                    HTTP/1.1                                               
Server self connect                Not expected HTTP response body:                       
Server Software                    nginx/1.25.3                                           
User Agent                         Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15

### MainWP Dashboard Settings      Detected Value                                      ###

Abandoned plugins/themes tolerance 365                                                    
Basic uptime monitoring enabled    No                                                     
MainWP Dashboard Version           Latest: 4.6  Detected: 4.5.3.2 Warning                 
MainWP legacy backups enabled      No                                                     
Maximum number of pages to return                                                         
Maximum number of posts to return                                                         
Maximum simultaneous install and update requests4                                                      
Maximum simultaneous requests      5                                                      
Maximum simultaneous requests per ip2                                                      
Maximum simultaneous sync requests 6                                                      
Minimum delay between requests     200                                                    
Minimum delay between requests to the same ip1000                                                   
Number of connected sites          14                                                     
Optimize for shared hosting or big networksNo                                                     
Plugin advanced automatic updates enabledYes                                                    
Primary Backup System              WPvivid Backup for MainWP                              
REST API enabled                   No                                                     
Site health monitoring enabled     Yes                                                    
Theme advanced automatic updates enabledYes                                                    
Use WP Cron                        Yes                                                    
WP Core advanced automatic updates enabledNo                                                     

### Extensions                     Version                                                License                                      Status   ###

Activity Log for MainWP            2.1.1                                                                                                           
Advanced Uptime Monitor Extension  5.2.6                                                  Active                                       Pass        
MainWP Matomo Extension            4.1.3                                                  Active                                       Pass        
MainWP Pro Reports Extension       4.2                                                    Active                                       Pass        
WPvivid Backup MainWP              0.9.32                                                                                                          

### Plugin                         Version                                                Status                                    ###

Activity Log for MainWP            2.1.1                                                  Active                                       
MainWP Dashboard                   4.5.3.2                                                Active                                       
WP Mail SMTP                       3.11.0                                                 Active                                       
WPvivid Backup MainWP              0.9.32                                                 Active                                       

Thanks for the system report.

So for this site, the progress bar worked as expected but only for this child site?

What software are you using for your localhost setup?

Can you try other MainWP themes and see if that helps?

So for this site, the progress bar worked as expected but only for this child site?

Yes, when my child site on the same server was one of the ones with updates, that site showed it was complete after a few seconds and the progress bar advanced (to 17% if I recall, in that case). Everything else continued to spin indefinitely.

What software are you using for your localhost setup?

I am using nginx with fastcgi. I installed with homebrew on MacOS. This is my first time setting up nginx, and I had to try a few times to get the REST API to work without errors. Everything seems to be working now, but I wouldn’t be surprised if my nginx configuration is part of the problem.

Can you try other MainWP themes and see if that helps?

Sure. I have just now tried Default, Dark, Classic, WP Admin, and Minimalistic. All show the same behavior. I also noticed (at least with the Defaulte theme) that if I request an update to a single plugin on a single site it does not open the modal but just shows a progress indicator in the table of updates. This too spins indefinitely even though the update is soon completed.

Screen Shot 2024-01-04 at 16.47.10 PM

I don’t know if this helps, but if I click the “sync dashboard with sites” button I get a similar modal and progress bar. I see no issues with this one, and the sites complete their sync and the bar shows progress as it should.

Thanks for the additional details.

I will have to check with the development team and see if they have any additional ideas as to why this issue might be occurring in your localhost environment.

We are still unable to reproduce the issue.

As you can see, the progress bar is rendering fine on a locahosted setup (Local by Flywheel) for both local and web hosted child sites.

Can you check if you are seeing any errors in the browser console?
And please set the Action Logs to debug and see if anything relevant gets logged there.

Thank you for the suggestions. I think this might be progress.

The console gave the following alert (twice): “Failed to load resource: the server responded with a status of 504 (Gateway Time-out), the resource being wp-admin/admin-ajax.php. I cross-checked in the server error log:

(edit: corrected log excerpt to reflect timestamps of the same test as below)

2024/01/08 13:57:00 [error] 1432#0: *33685 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "POST /mainwp/wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8080", referrer: "http://localhost:8080/mainwp/wp-admin/admin.php?page=UpdatesManage"
2024/01/08 13:57:00 [error] 1432#0: *33686 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "POST /mainwp/wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8080", referrer: "http://localhost:8080/mainwp/wp-admin/admin.php?page=UpdatesManage"

The debug log showed the following:

2024-01-08 18:55:39 Action logs set to: DEBUG
2024-01-08 18:56:00 [childsite1.com] [childsite1.com] ::fetch_url_site:: Request to [https://childsite1.com/wp-admin/admin-ajax.php] [user=xxxxxx&function=upgradeplugintheme&nonce=7282&type=plugin&list=bertha-ai-free%2Fbertha-ai.php&optimize=0&sign_algo=7&mainwpsignature=redacted]
2024-01-08 18:56:00 [childsite1.com] [childsite1.com] ::fetch_url_site:: Executing handlers
2024-01-08 18:56:00 [childsite2.org] [childsite2.org] ::fetch_url_site:: Request to [https://childsite2.org/wp-admin/admin-ajax.php] [user=xxxxxx&function=upgradeplugintheme&nonce=4099&type=plugin&list=mailchimp-for-wp%2Fmailchimp-for-wp.php&optimize=0&sign_algo=7&mainwpsignature=redacted]
2024-01-08 18:56:00 [childsite2.org] [childsite2.org] ::fetch_url_site:: Executing handlers
2024-01-08 18:56:05 [childsite1.com] [childsite1.com] ::fetch_url_site:: http status: [200] err: []
2024-01-08 18:56:05 [childsite1.com] [childsite1.com] ::fetch_url_site:: [https://childsite1.com/wp-admin/admin-ajax.php] postdata [user=xxxxxx&function=upgradeplugintheme&nonce=7282&type=plugin&list=bertha-ai-free%2Fbertha-ai.php&optimize=0&sign_algo=7&mainwpsignature=redacted] information: [OK]
2024-01-08 18:56:06 [childsite2.org] [childsite2.org] ::fetch_url_site:: http status: [200] err: []
2024-01-08 18:56:06 [childsite2.org] [childsite2.org] ::fetch_url_site:: [https://childsite2.org/wp-admin/admin-ajax.php] postdata [user=xxxxxx&function=upgradeplugintheme&nonce=4099&type=plugin&list=mailchimp-for-wp%2Fmailchimp-for-wp.php&optimize=0&sign_algo=7&mainwpsignature=redacted] information: [OK]
2024-01-08 18:56:09 :: tryVisit :: [url=https://childsite1.com/] [http_status=200] [error=] Click to See Response
2024-01-08 18:56:09 :: tryVisit :: [url=https://childsite2.org/] [http_status=200] [error=] Click to See Response
2024-01-08 18:57:10 :: tryVisit :: [dnsRecord=]
2024-01-08 18:57:10 :: tryVisit :: [dnsRecord=]

Without knowing fully what I am looking at, it looks like things are flowing the way they should until the last two lines of the debug log. Any idea what this is trying to do?

I don’t think it’s related, but I did see a 404 error pop up as well, requesting wp-content/plugins/mainwp/assets/js/moment/moment.min.js.map.

Thanks for the logs.
However, the development team has informed that they don’t point to a potential cause.

Would you mind opening a private Help Desk ticket so can send collect some more information about your Dashboard?

And please refer to this Managers thread by its URL in the ticket.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.