debug – WordPress response getting truncated (PHP-FPM + NGINX)

We have a website that used to work but is now giving a blank page when we try to edit a post. On debugging we found that the response sent back to the browser from the wp-admin/post.php endpoint is getting truncated. Here are details of our setup:

  • we have a Dockerized setup consisting of a container based on wordpress:php7.4-fpm-alpine image that runs PHP-FPM
  • and a NGINX webserver based on nginx:1.17 image that forwards requests to PHP-FPM

we use the default settings that come with the Docker images. We have tried the solutions in below articles with no luck:

NGINX has access to all the cache folders. we checked and both access log /var/log/nginx/access.log as well as error log /var/log/nginx/error.log of NGINX are empty. NGINX caches are also empty. There is no error in the logs of either NGINX or WordPress.

The response we get back is 153147 bytes in size.

I will create Professional wordpress website. for $125

I will create Professional wordpress website.

I will create a Professional Business Website in WordPress with responsive business design

In this service, I will create you a professional WordPress business website as per your needs.

My name is Snigdha and I am a WordPress developer and designer with more than 3 years of experience indeveloping and maintaining WordPress websites. I will also create your modern WordPress website as well.

So what is your business type? Let me know so that I will design and develop a fabulous website for your business. I am ready to develop Information based, blogging, affiliate, niche website, listing / directory, e-commerce, business listing,corporate company website design and development, etc.

Services I am offering in this gig:

Complete WordPress website development

Designing your WordPress site

Theme setup or changing

Revamp WordPress website

limited On page Seo optimization

Maintainance of WordPress your site

Responsive WordPress site on all devices

Complete Website with 5 Pages

Professional and high quality design

Free 2 days support after completion

Have any questions message me I will respond to you as soon as possible.

Thanks.

.

Display Author Registration Date – WordPress Development Stack Exchange

In author archive, I want to show author registration date in the following format:

January 16, 2021

I have found this code:

$user_ID = $post->post_author;
echo the_author_meta( 'user_registered', $user_ID );

But its output format is:

2021-01-16 10:40:52

How can I strip off time and get my desired format?

I am using date format F j, Y

Migrate my WordPress website to Blogger

I have a website created on WordPress its a blog actually I want to transfer it to Blogger because sites seems to load a lot faster on Blogger. Please help me doing it.

Forums for Selling WordPress Themes

Can someone recommend a list of top Forums where I can sell custom-made WordPress Themes as a freelancer without paying money?

Hi, Can anyone pls guide me how to download my wordpress website backup in gcp to local system

Can anyone please guide me how to download my word press website backup in google cloud platform to local system

nginx – WordPress multisite wp-admin to many redirects

I have a WordPress blog set up with the multisite feature.

there are two blogs setup on it with the following URLs

# Main blog home
https://example.com/blog/

# Main blog admin
https://example.com/blog/wp-admin/

# 2nd blog home
https://example.com/blog/2nd/

# 2nd blog admin
https://example.com/blog/2nd/wp-admin/

Following the nginx configuration, I’m using

server {
        listen 80;
        server_name example.com www.example.com;
        root /var/www/website/build;

        index index.html index.htm index.php;

        # Serve blog
        location /blog {
                return 301 /blog/;
        }

        location ^~ /blog/ {
                autoindex on;
                root /var/www/;
                index index.php index.html index.htm;

                try_files $uri $uri/ /blog/index.php?$args;

                location ~ .php$ {
                        include snippets/fastcgi-php.conf;
                        fastcgi_param  SCRIPT_FILENAME    $request_filename;
                        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
                }
        }

        # Serve other files
        location / {
                try_files $uri $uri/ =404;
        }

        location ~ .php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }

        location ~ /.ht {
                deny all;
        }
}

With this setup, every above URL is working, except the 2nd blog admin panel.
On accessing https://example.com/blog/2nd/wp-admin/ it is giving ERR_TOO_MANY_REDIRECTS error.

disable fontawesome style in wordpress float menu plugin

i want disable load fontawesome file by WordPress plugin( Float menu ). but my code not working!!!

add_action( 'wp_print_styles', 'masoud_nkh_wp_styles', 100);
function masoud_nkh_wp_styles() {
    global $post;
    if ( is_front_page() &&  is_a( $post, 'WP_Post' )  ) {
    wp_dequeue_style('float-menu-pro-fontawesome-css');
    wp_deregister_style('float-menu-pro-fontawesome-css');
}
}

plugins – Implemented InnerBlocks but WordPress didnt support it; now the block doesnt show up

Hey Guys I am trying to get a hold on Gutenberg and I tried to follow some course online about it. Instead of adding the blocks in one return render I saw that I can use Innerblocks templates. I tried to implement this feature but I got an error that showed up and cant find again. I cant find it because of my custom block that is not showing up. I tried to turn of my plugin and turned off the innerblocks and used RichText again but that didnt work.

This is my edit.js

/**
 * Retrieves the translation of text.
 *
 * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
 */
import { __ } from '@wordpress/i18n';

/**
 * React hook that is used to mark the block wrapper element.
 * It provides all the necessary props like the class name.
 *
 * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps
 */
import { InnerBlocks } from "@wordpress/block-editor/";


const MY_TEMPLATE = (
    // ( "core/image", {} ),
    ( "core/heading", { placeholder: "Giveaway Title" } ),
    ( "core/paragraph", { placeholder: "Giveaway Description" } ),
    ( "core/button", { placeholder: "Call to Action" } )
)

/**
 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
 * Those files can contain any CSS code that gets applied to the editor.
 *
 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
 */
import './editor.scss';

/**
 * The edit function describes the structure of your block in the context of the
 * editor. This represents what the editor will render when the block is used.
 *
 * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit
 * @param {Object} (props)           Properties passed from the editor.
 * @param {string} (props.className) Class name generated for the block.
 *
 * @return {WPElement} Element to render.
 */
export default function Edit( { className, attributes, setAttributes } ) {
    return (


            <div className={className}>
                    <InnerBlocks template={MY_TEMPLATE} />
            </div>
    );
}

My attributes are located in index.js

/**
 * Registers a new block provided a unique name and an object defining its behavior.
 *
 * @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
 */
import { registerBlockType } from '@wordpress/blocks';

/**
 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
 * All files containing `style` keyword are bundled together. The code used
 * gets applied both to the front of your site and to the editor.
 *
 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
 */
import './style.scss';

/**
 * Internal dependencies
 */
import Edit from './edit';
import save from './save';


/**
 * Every block starts by registering a new block type definition.
 *
 * @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
 */
registerBlockType( 'create-block/mienshao-giveaway', {

    /*
        TODO: Custom Gutenberg slider in the making

        attributes: {
            slider: {
                source: html,
                selector: div,
                default:{
                    arrows: false,
                    circles: true
                }
            }
        }

     */

    attributes: {
        title: {
            type: 'string',
            source: 'html',
            selector: 'h2'
        },
        titleColor: {
            type: 'string',
            default: '#333'
        },

        description: {
            type: 'string',
            source: 'html',
            selector: 'p'
        },

        descriptionColor: {
            type: 'string',
            default: '#333'
        },
        accounts: {
            default: {
                twitter: false,
                tweet: false,
                youtube: false,
                facebook: false
            }
        },
        twitter: {
            default: {
                text: '',
                account: ''
            }
        },
        tweet: {
            default: {
                text: '',
                message: '',
                url: ''
            }
        },
        youtube: {
            default: {
                text: '',
                url: ''
            }
        },
        facebook: {
            default: {
                text: '',
                url: ''
            }
        }

    },

    /**
     * @see ./edit.js
     */
    edit: Edit,

    /**
     * @see ./save.js
     */
    save,
} );

I would like to know why my Gutenberg block isnt even recognized or doesnt want to render either variations.

apache – Docker Image not having correct permissions for www-data in WordPress

So I have a docker container running Apache/WordPress which runs Apache as www-data. I build the image using a Dockerfile and started it. I then copied my local uploads and plugin folders using:

docker cp ../wp-content/uploads esaanz_dev:/var/www/html/wp-content

When I access the machine and I try to install a plugin, always gives me Installation failed: Could not create directory. Furthermore, my backup plugin cannot wrote to wp-content/updraft to create backups.

I have logged into the machine using docker exec and I have run this command:

chown -R www-data:www-data wp-content

The problem persists even though www-data has access to everything:

Permissions for www-data

I am going mad figuring why WordPress is not able to write if it’s running under www-data and this user/group can write to anything in the container.

Any pointers are greatly appreciated.