It is connected to the database, it does not display any errors, but when I enter the site, the page is absolutely empty. Previously, I did not encounter such a problem, on previous sites everything worked as it should. And there is even no error, just a blank page. I would be grateful for any help)

Code file index.php:

<?php get_header(); ?> <?php if (have_posts()): while (have_posts()): the_post(); ?> <?php the_content(); ?> <?php endwhile; endif; ?> <section class="top-info"> <div class="item slider"> <div class="wrap"> <div class="carousel-2 owl-carousel"> <div class="carousel-item"> <?php $image = get_field('image1'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> <div class="text"> <p> <a href="<?php the_field('link1') ?>"> <?php the_field('text1') ?> </a> </p> </div> </div> <div class="carousel-item"> <?php $image = get_field('image2'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> <div class="text"> <p><a href="<?php the_field('link2') ?>"> <?php the_field('text2') ?> </a></p> </div> </div> <div class="carousel-item"> <?php $image = get_field('image3'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> <div class="text"> <p><a href="<?php the_field('link3') ?>"> <?php the_field('text3') ?> </a> </p> </div> </div> </div> </div> </div> <div class="item ev-calendar"> <?php dynamic_sidebar( 'calendar' ); ?> </div> <div class="item large"> <?php $image = get_field('image4'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> <div class="wrap"> <a href="<?php the_field('link4') ?>"> <div class="title"><?php the_field('title4') ?></div> <div class="text"><?php the_field('text4') ?></div> </a> </div> </div> <div class="item small"> <?php $image = get_field('image5'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> <div class="wrap"> <a href="<?php the_field('link5') ?>"> <div class="title"><?php the_field('title5') ?></div> <div class="text"><?php the_field('text5') ?></div> </a> </div> </div> <div class="item subscribe"> <div class="title"><?php the_field('tr_subscribe', 355) ?></div> <div class="wrap"> <?php echo do_shortcode('[contact-form-7 id="23"]'); ?> </div> </div> </section> <section class="recent-news"> <div class="base-title"><?php the_field('recent_news', 355) ?></div> <div class="carousel-1 owl-carousel"> <?php if ( have_posts() ) : // Ссли ΠΈΠΌΠ΅ΡŽΡ‚ΡΡ записи Π² Π±Π»ΠΎΠ³Π΅. query_posts('cat=3,28,29,30'); // ΡƒΠΊΠ°Π·Ρ‹Π²Π°Π΅ΠΌ ID Ρ€ΡƒΠ±Ρ€ΠΈΠΊ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ вывСсти. while (have_posts()) : the_post(); // запускаСм Ρ†ΠΈΠΊΠ» ΠΎΠ±Ρ…ΠΎΠ΄Π° ΠΌΠ°Ρ‚Π΅Ρ€ΠΈΠ°Π»ΠΎΠ² Π±Π»ΠΎΠ³Π° ?> <a href="<?php the_permalink(); ?>" class="item"> <div class="date"><?php the_date('j F Y'); ?></div> <div class="text"><?php the_title(); ?></div> </a> <?php endwhile; // Π·Π°Π²Π΅Ρ€ΡˆΠ°Π΅ΠΌ Ρ†ΠΈΠΊΠ». endif; /* БбрасываСм настройки Ρ†ΠΈΠΊΠ»Π°. Если Π½ΠΈΠΆΠ΅ ΠΏΠΎ ΠΊΠΎΠ΄Ρƒ Π±ΡƒΠ΄Π΅Ρ‚ ΠΈΠ΄Ρ‚ΠΈ Π΅Ρ‰Π΅ ΠΎΠ΄ΠΈΠ½ Ρ†ΠΈΠΊΠ», Ρ‡Ρ‚ΠΎΠ±Ρ‹ Π½Π΅ Π±Ρ‹Π»ΠΎ сбоя. */ wp_reset_query(); ?> </div> </section> <section class="members"> <div class="base-title"><?php the_field('our_members', 355) ?></div> <div class="members-box"> <?php dynamic_sidebar( 'mem' ); ?> </div> <div class="more-link"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>membership/list-of-member-companiens"><?php the_field('all_members', 355) ?></a> </div> </section> <?php get_footer(); ?> 

Htaccess file code:

 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress AddDefaultCharset utf-8 php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_flag display_errors on php_flag error_reporting E_ALL php_value display_errors 1 php_value error_reporting 204 

  • And what deduces if to use other template? Or no template works? - labris
  • The @labris thing is that I can't even go into wp-admin, it displays blank pages everywhere, wherever I go. Uploaded from the server is a site, you need to make changes, but it is not even displayed. If I did it myself, then I think such a problem would not have arisen, and so it is necessary to suffer with the difficulty of other developers. And what is most interesting, on the remote server everything is displayed, but on the local one does not want. - Vladimir
  • Does the database work correctly? - labris
  • @labris connects to the database successfully, does not issue errors. Initially I thought that I did not give errors because I did not output anything, but no, if I put incorrect data on the connection to the database, I get an error to connect to the database, and when the data is correct, there are no errors, but it does not display anything. - Vladimir
  • The most common causes of the appearance of a "white screen of death" in WordPress - 1. WordPress plugin error; 2. Error WordPress Theme; 3. Database error. You don’t have a third one, so the first two reasons are most likely to blame. Some settings do not work on local storage (since the site itself works fine on a remote server). Did you change the settings in the wp-options table after the transfer? Where is the base URL listed? - labris

2 answers 2

From the comments it is clear that the main site is working, it means that you have an error on the local one. The white screen of death is a php error. The code itself could not be copied correctly, which means that the base is damaged inside and one of the plug-ins crashes when processing corrupted data. If the changes in the database are made by global replacement of the domain name in the text dump, then here it is, the reason. You have a number of plugins installed that work with serialized data.

To transfer a site with serialized data, you must:

  1. Enter the new domain in both the WordPress Address (URL) and the Website Address (URL).

  2. Replace the старый Π΄ΠΎΠΌΠ΅Π½ with the Π½ΠΎΠ²Ρ‹ΠΉ Π΄ΠΎΠΌΠ΅Π½ in all internal links in the database. This cannot be done as a replacement for the text dump of the database, since in this case the serialized data will be damaged. Best to use DATABASE SEARCH AND REPLACE SCRIPT IN PHP

  • You can still use this plugin: wordpress.org/plugins/wp-migrate-db - labris
  • Another option is hacking and injection into the code - Alexey Shatrov
  • @AlexeyShatrov what is hacking and injection? On the site in the internet everything is OK, the problem is on the local. - KAGG Design
  • In the initial question it is not indicated that the site is on LAN, and the injection is when the WP is included in WP and generates the pages with the necessary keys. - Alexey Shatrov
  • You commented not a question, but my answer. Not reading. - KAGG Design

And there is even no error, just a blank page. I would be grateful for any help)

You need to watch the logs or / and turn on the error output on the screen.
See FAQ-> White Screen

To transfer / clone a site you should use special plugins. Eg Duplicator .
Or after the transfer, but without going to the site (this is important!), Use the SRDB script.
In no case do not edit the base and dump manually - serialized arrays will be beaten because of which there will be various problems. Not always obvious. It can also come out after a time (sometimes months) when the cause of their appearance is no longer clear and difficult to find and fix.