я взял wp_user_roles с другого чистого сайта, и вставил в БД этого сайта.
define('WP_ALLOW_REPAIR', true);
a:1:{s:13:"administrator";b:1;}
прочитайте статью, которую скинул выше Я не могу ставить плагины. WP считает меня не администратором.
public class Exporter {
public <T> void exportData(List<T> exportedList, String sheetName, String fileName) {
List<T> importedList = exportedList;
Workbook workbook = new XSSFWorkbook();
CreationHelper creationHelper = workbook.getCreationHelper();
Sheet sheet = workbook.createSheet(sheetName);
int rowNum = 0;
for (T genericType : importedList) {
Set<Method> getters = ReflectionUtils.getAllMethods(genericType.getClass(),
ReflectionUtils.withModifier(Modifier.PUBLIC), ReflectionUtils.withPrefix("get"));
Row row = sheet.createRow(rowNum++);
Class customClass = genericType.getClass();
for (Method getter : getters) {
String getterName = getter.getName();
try {
row.createCell(rowNum).setCellValue(genericType.getClass().getMethod(getterName));
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
}
}
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(fileName + ".xlsx");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
try {
workbook.write(fileOutputStream);
} catch (IOException e) {
e.printStackTrace();
}
try {
assert fileOutputStream != null;
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
workbook.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
row.createCell(rowNum).setCellValue(genericType.getClass().getMethod(getterName));
Cannot resolve method 'setCellValue(java.lang.reflect.Method)
Вышло как отдельный раздел для записей
..../wp-content/cache/autoptimize/...
.entry-content.e-content input[type="submit"]:nth-child(3n) {
white-space: normal !important;
}
<?php if (have_posts()) :
$i = 0;
while (have_posts()) : the_post();
$i++;
echo "<div class='myClass_',$i>".get_the_content()."</div>";
endwhile;
endif; ?>
1) https://codex.wordpress.org/WP_DEBUG
включите режим дебаг и проверьте рнр ошибки
2) откройте консоль браузера и проверьте ошибки js ошибки (кнопка F12 -> Консоль)
3) включите режим repair в wp-config
https://www.maketecheasier.com/fix-corrupted-wordp...
и попробуйте пофиксить ошибки БД
4) поочередно отключайте плагины или тему, чтобы исключить конфликт плагинов