Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content

WordPress (Developer)

199 Topics 1.6k Posts
  • /wp-config.php file is writable

    4
    0 Votes
    4 Posts
    331 Views
    girishG

    In managed WP, the file is not writable.. But in Developer edition, a user has to change that file themselves, from the filemanager. This is by design though - the developer edition is vanilla and developer sets it up as they see fit.

  • Change the default wp_ database tables prefix

    3
    3 Votes
    3 Posts
    259 Views
    girishG

    Are you suggesting this for the default setup? There are already plugins that do this (and indeed many of our customers have randomized tables). IIRC, it's one of those security plugins. The Developer edition is vanilla, the intent is not to change the defaults.

    On a side note, this whole table name randomization is .. questionable. Pretty much no app outside WP does this, it's not really needed when apps are deployed properly. But only needed maybe because people install plugins. Also, see https://www.wordfence.com/blog/2016/12/wordpress-table-prefix/

  • Change wp-content foldername not possible?!

    Solved
    8
    0 Votes
    8 Posts
    528 Views
    S

    As expected it worked as expected with the above code in Developer Edition. ๐Ÿ™‚ Didn't noticed that before, so thanks for your help and sorry for the noise.. ๐Ÿ˜‰

  • 1 Votes
    9 Posts
    842 Views
    d19dotcaD

    @girish Just wanted to say I finished testing and yes this works great! Thank you so much for the fix! ๐Ÿ™‚

  • Unmanaged Wordpress - Content Security Policy Issues

    Moved
    2
    1 Votes
    2 Posts
    329 Views
    girishG

    @jagan by default, Cloudron doesn't set any CSP or CORS headers for apps. The apps set the appropriate CSP for themselves. The CSP setting in Cloudron is only meant to used as an extreme measure (i.e no way to change an app's hardcoded CSP).

    With this mind, I would remove any custom CSP setting you have added in Cloudron dashboard. This is most likely the wrong approach.

    Next, I would investigate the CSP/CORS headers sent by WordPress. Per, https://community.adobe.com/t5/acrobat-services-api-discussions/pdf-embed-api-got-error/td-p/13142824 , you need something like Access-Control-Allow-Origin: * sent from WordPress.

  • 0 Votes
    3 Posts
    261 Views
    girishG

    @Vladimir Can you explain a bit more what the issue you are trying to solve is and what is that config you have posted? I see that it's some redis config, but what are you looking to achieve?

  • 0 Votes
    12 Posts
    904 Views
    jdaviescoatesJ

    @girish said in Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer)):

    Feature Requests is for platform code (that's what I think anyway).

    Wouldn't it take some platform code to enable this in the same way it's been enabled for the LAMP app?

    In my mind "Feature Requests" is just for "features" as that's what it says on the tin. But no biggie, as you please ๐Ÿ™‚

  • 1 Votes
    5 Posts
    395 Views
    girishG

    @jdaviescoates said in Installed at map.bridport.coop then deleted, then reinstalled on same location: server not found:

    Is there a way to flush the NXDOMAIN cache on routers/ computers?

    Not that I am aware of. These days browsers also do their own DNS caching complicating things even more.

  • 1 Votes
    3 Posts
    400 Views
    d19dotcaD

    @girish strange that you donโ€™t see that error on a fresh instance, thatโ€™s how I reproduced the problem before to compare a fresh DB with my used ones and noticed it on the fresh one too. Iโ€™ll look into that further. Thanks ๐Ÿ˜Š

  • Redis database is very large

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    jdaviescoatesJ

    @privsec 512mb is the highest I've got any of mine set, and that's mostly just me ramping up things for Nextcloud in the hope it somehow speeds it up. In reality it's not even using half of that. Most I've got on any WordPress website is 256MB. But again, seemingly not even using half of that most of the time. So strange that you're went up so insanely high.

  • sh: 1: /usr/sbin/sendmail: not found in wordpress developer vesion

    Moved
    3
    0 Votes
    3 Posts
    430 Views
    girishG

    BTW, once configured to use Cloudron mail, you can track the activity in the mail server event log - https://docs.cloudron.io/email/#event-log

  • App unresponsive due to error

    Solved
    11
    0 Votes
    11 Posts
    784 Views
    d19dotcaD

    Perfect! I ran some tests today with tweaking various numbers and looked at recommendations online too. It's mostly a copy of yours @imc67 in the end but with a lower MaxConnectionsPerChild. Ran a bunch of different tests with different numbers but concluded that was the best bang for the buck so-to-speak given the 4 GB memory max set on each WP app.

    It's a mix of default values from the Ubuntu install and the default Apache values in the original package too (for the 256 MaxRequestWorkers for example). I'm pleased with the results. ๐Ÿ™‚

    Here's what I have for reference now, and I used ab (Apache Benchmark) to run some performance tests and had significant improvements over the defaults. Thought I'd share the testing results in case anyone was interested.

    New mpm_prefork.conf I'm using:

    # Restart the app if you make changes to this file <IfModule mpm_prefork_module> # On startup, start these many servers StartServers 5 # At any given time, keep atleast these many servers MinSpareServers 5 # At any given time, keep atmost these many idle servers (this is always >= MinSpareServers+1) MaxSpareServers 10 # Maximum number of servers at any given instant. Requests will be queued after this MaxRequestWorkers 256 # Recycle process after handling these many requests. This protected against accidental memory leaks MaxConnectionsPerChild 500 </IfModule>

    Resources:

    https://httpd.apache.org/docs/2.4/mod/prefork.html https://exampleconfig.com/view/apache-ubuntu20-04-etc-apache2-mods-available-mpm_prefork-conf https://www.woktron.com/secure/knowledgebase/133/How-to-optimize-Apache-performance.html https://www.maketecheasier.com/optimizing-apache-part-1/

    Results from ab with default settings that come with Cloudron's WP package: (note the rather large spread between min and max request times)

    Concurrency Level: 50 Time taken for tests: 12.391 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 84813000 bytes HTML transferred: 84205000 bytes Requests per second: 80.70 [#/sec] (mean) Time per request: 619.574 [ms] (mean) Time per request: 12.391 [ms] (mean, across all concurrent requests) Transfer rate: 6684.04 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 227 291 36.4 287 401 Processing: 220 281 122.2 252 1039 Waiting: 144 190 120.0 161 954 Total: 451 572 127.3 546 1285 Percentage of the requests served within a certain time (ms) 50% 546 66% 570 75% 584 80% 594 90% 624 95% 818 98% 1091 99% 1261 100% 1285 (longest request)

    Results after tweaking to the above new configuration: (note that the max request time here is about 60% faster still than original config results and overall a much more consistent behaviour too!)

    Concurrency Level: 50 Time taken for tests: 11.358 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 84813000 bytes HTML transferred: 84205000 bytes Requests per second: 88.04 [#/sec] (mean) Time per request: 567.899 [ms] (mean) Time per request: 11.358 [ms] (mean, across all concurrent requests) Transfer rate: 7292.24 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 230 287 26.9 283 389 Processing: 220 252 17.3 249 329 Waiting: 144 160 10.0 157 217 Total: 467 539 33.0 538 649 Percentage of the requests served within a certain time (ms) 50% 538 66% 550 75% 559 80% 567 90% 584 95% 599 98% 618 99% 622 100% 649 (longest request)
  • App not starting, where to find logs?

    Solved
    3
    0 Votes
    3 Posts
    193 Views
    J

    @d19dotca that was too easy. Thanks a lot!

  • WP Mail Plug-In not accepting inputs during setup

    Moved Solved
    3
    0 Votes
    3 Posts
    200 Views
    mpeterson0418M

    @jdaviescoates

    That did the trick. Thanks for the prompt feedback and suggestion!

  • Mixed database table types (MyISAM vs InnoDB)

    4
    0 Votes
    4 Posts
    233 Views
    d19dotcaD

    @girish okay Iโ€™ll try that, thanks for looking into it Girish! Itโ€™s definitely odd and Iโ€™m surprised I only recently discovered this concern. Some of them definitely existed before Cloudron days and came over as part of the โ€œall in one migrationโ€ plugin which I have a feeling overwrite the database to match the original source, so likely is part of the reason there. Some newer ones also have it though but thinking further I think itโ€™s because it was an issue in the template one I spun up new site builds from.

    Iโ€™ll try converting and hopefully thatโ€™ll help with some stuff. Will report back on whether itโ€™s successful or not ๐Ÿ™‚

  • Application stuck on startup

    5
    0 Votes
    5 Posts
    394 Views
    girishG

    @WiseMetalhead if you can write to support@cloudron.io, we can take a look. Hard to tell what is going wrong with the screenshot.

  • action scheduler logs are beefy

    Moved
    3
    0 Votes
    3 Posts
    230 Views
    P

    @girish yeah, i was just freaking out into the forum. nobody else to talk to about this stuff in my world ๐Ÿ˜… explanation in the other thread - but i think ... THINK i have that issue solved.

  • Actionscheduler takes 4GB

    9
    0 Votes
    9 Posts
    717 Views
    P

    @girish i put in a self made plugin with nothing but a drop table command and it didn't fire off immediately so i thought it didnt work .. but when i went back a few hours later to dig thru those logs .. they were gone! ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ i also turned off wp-cron and scheduled everything manually at a more modest rate - and since I haven't had any issues.

    bece7023-9ebf-4d16-ad58-824ce432eea1-image.png

    except this ๐Ÿ‘†๐Ÿฝ its listing myhouseofhearing.ca at 1.2GB and i CANT figure out why. looking through WinSCP or File Manager, there's nothing in there that ought to be so big!
    im going to run -prune on the docker later this evening, and hope that clears up too, but im out of ideas for the wp site!

    are there any 3rd party apps i could install to get a more accurate look at the filesystem and resource usage??

  • WP Alias Domains

    Moved Solved
    18
    0 Votes
    18 Posts
    2k Views
    girishG

    @adpiadmin ah cool, I will mark this as solved then.

  • and my primary site is dead =\

    Moved
    9
    0 Votes
    9 Posts
    514 Views
    P

    @subven
    88a0c3ba-7f31-4ec8-9f1a-5de551e2869d-image.png