Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
jackpot
Aug 31, 2004

First cousin to the Black Rabbit himself. Such was Woundwort's monument...and perhaps it would not have displeased him.<
I've got two issues going on at the same time:

1) I've got a page throwing an error:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /home/sdfsdfsdf/public_html/foldername/wp-includes/meta.php on line 829.

And 2) I got an email warning me that "Your web hosting account is approaching or exceeding its resource limits."

Which are here:


For #1, the site's been working fine for weeks, then someone was making changes to this particular page, and bam, it's broken. Sometimes I can delete content and save and it's fine, sometimes I can't. Mostly I can't. The site uses Visual Composer for most of everything, and it seems like I can add some content in this way fine (text, etc), but if I try to add something more complex it throws up. The rest of the site runs fine. I'm aware that there are a ton of results if you search for that error, but they're not real clear on why it's happening. As much as I want to fix it, I really want to know what's triggering it, too.

Long story short one of the proposed solutions was to increase the memory limit by adding the following in my wp-config file:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

And...this seems to work. Some guys here propose that there's a fuckton of ajax requests happening when you edit with Visual Composer, causing it to run out of memory, but I'm out of my depth at this point so I can't say whether they're right or not.

I guess my question is, has anyone run into this before, and is there any way to better optimize a site using VC?

jackpot fucked around with this message at 13:46 on Sep 2, 2015

Adbot
ADBOT LOVES YOU

fuf
Sep 12, 2004

haha
Visual Composer just does use a lot of memory, so there might not actually be anything wrong with your setup.

One thing you can do is break up the page that is causing problems into a set of smaller pages. You can still display them as a single page on the front-end, but limiting the number of VC elements that need to load when you edit a page should help performance.

You can disable VC elements that you never use with vc_remove_element:
https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524329
I think I remember reading once that this reduces memory usage but I'm not sure.

P3 might tell you something useful:
https://wordpress.org/plugins/p3-profiler/

Dr. Fishopolis
Aug 31, 2004

ROBOT
Holy gently caress, stay away from wpmudev at all costs.

I was autobilled for 3 months worth of membership on the same day I tried to cancel, so I emailed (politely) to see if they could resolve the issue. Instead of just canceling my account and issuing a refund, they demanded a reason first, and got angry and defensive when I gave them one. I'm literally emailing with a guy who is going point by point over my entire support request history and explaining how each issue I've had was my fault.

Probably the worst experience with a software company I've ever had.

Eight Is Legend
Jan 2, 2008
Is there a plugin that can keep specific tags from showing in posts? I have a tag for posts that should be in the frontpage slider, but I don't want it appearing to readers. Should be easy to search for, but I can't find anything :/

Xarthor
Nov 11, 2003

Need Ink or Toner for
Your Printer?

Check out my
Thread in SA-Mart!



Lipstick Apathy
I've got a WP problem and I can't seem to figure out what the heck is going on.

Right now when I go to my site (http://theorangemusic.com) all I get is a white screen. Previous to that everything was working correctly and I hadn't changed anything or probably even logged in in maybe 2-4 weeks. The site was working fine and then *poof* it just stopped working.

My server is working fine because I can log into cPanel and see my files and stuff. Nothing in the files looks corrupted or missing...at least to my eyes. The problem is I can't login to my WP admin side at all (http://theorangemusic.com/wp-admin). I just get the white screen.

Any ideas? Is there a way to reload WP without losing all my files? What do I do?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
You're probably getting a 500 error but php is set to suppress errors so nothing is rendering. Look at your server logs and see if you can find the issue.

Xarthor
Nov 11, 2003

Need Ink or Toner for
Your Printer?

Check out my
Thread in SA-Mart!



Lipstick Apathy
Here's my WP error log.

quote:

[19-Sep-2015 22:56:24 UTC] WordPress database error Server shutdown in progress for query SELECT prh_posts.* FROM prh_posts WHERE 1=1 AND prh_posts.post_type = 'wp-types-user-group' ORDER BY prh_posts.post_date DESC made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, wpcf_embedded_init, require_once('/plugins/types/embedded/usermeta-init.php'), Usermeta_Access->__construct, wpcf_admin_fields_get_groups, get_posts, WP_Query->query, WP_Query->get_posts
[21-Sep-2015 06:14:58 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[21-Sep-2015 06:14:58 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/timezonedb.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/timezonedb.so: cannot open shared object file: No such file or directory in Unknown on line 0

EDIT: I'm also getting this error

quote:

[Thu Sep 24 10:09:37.822750 2015] [access_compat:error] [pid 74326:tid 139802764625664] [client 210.89.37.122:53412] AH01797: client denied by server configuration: /home/pvvzbtyn/public_html/xmlrpc.php

Can anyone make heads or tails of it?

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
Are you on shared, or provided hosting? Is it wordpress-specific hosting? Are you expected to manage and update your own server? because...

Xarthor posted:

[21-Sep-2015 06:14:58 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[21-Sep-2015 06:14:58 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/timezonedb.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/timezonedb.so: cannot open shared object file: No such file or directory in Unknown on line 0
Smells like someone removed some modules, namely imagick and timezonedb, from the server, or they're implemented in another manner and nobody cleaned up the config. Are you using imagick? (dynamically resize and modify images on the server).
Chances are you don't need these, and they're just warnings, but you can check it out by dropping a file on the server with just phpinfo() and looking for these named modules. You'd normally expect imagick to show up in the list.

Xarthor posted:

[19-Sep-2015 22:56:24 UTC] WordPress database error Server shutdown in progress for query SELECT prh_posts.* FROM prh_posts WHERE 1=1 AND prh_posts.post_type = 'wp-types-user-group' ORDER BY prh_posts.post_date DESC made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, wpcf_embedded_init, require_once('/plugins/types/embedded/usermeta-init.php'), Usermeta_Access->__construct, wpcf_admin_fields_get_groups, get_posts, WP_Query->query, WP_Query->get_posts
The date stamp is well old though, so this probably isn't a bug, just an unhappy server reboot during someone's page load.

Xarthor posted:

[Thu Sep 24 10:09:37.822750 2015] [access_compat:error] [pid 74326:tid 139802764625664] [client 210.89.37.122:53412] AH01797: client denied by server configuration: /home/pvvzbtyn/public_html/xmlrpc.php
This is nothing to worry about. It seems like your host is denying access to the xmlrpc endpoint, which is fairly standard.

White-screen-of-death is a PHP error for sure, but with error displaying turned off. I realise that's your WP log, but what were the severity settings? Something must be missing here.

If you don't blowing up the public side of the site for a bit, you can add this to your wp_config:
code:
error_reporting(E_ALL);
@ini_set('display_errors', true);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
If you'd rather the public side didn't look like a shambles, then use this:
code:
error_reporting(E_ALL);
@ini_set('display_errors', false); 
define('WP_DEBUG', true);
define(‘WP_DEBUG_LOG’, true);
@ini_set('log_errors', true); 
@ini_set('error_log','phperrors.log'); // path to server-writable log file
The first one will blurt errors into the page with wreckless abandon, while the second one will pump them to a log file of your choosing, which you can then check to see what's really happening.

Edit: fixed the ini settings

v1nce fucked around with this message at 00:42 on Sep 25, 2015

fadderman
Feb 3, 2008
dyslectic lurker
What is the best way to debug a wp plugin, completely new to wordpress and my debug log has been trowing up errors

kedo
Nov 27, 2007

fadderman posted:

What is the best way to debug a wp plugin, completely new to wordpress and my debug log has been trowing up errors

1. Read error text to determine location of bug
2. Find bug and fix it
3. GOTO 1 until all bugs are fixed

I would offer more specific advice, but your question is about as vague as they get.

fadderman
Feb 3, 2008
dyslectic lurker

kedo posted:

1. Read error text to determine location of bug
2. Find bug and fix it
3. GOTO 1 until all bugs are fixed

I would offer more specific advice, but your question is about as vague as they get.

kedo posted:

1. Read error text to determine location of bug
2. Find bug and fix it
3. GOTO 1 until all bugs are fixed

I would offer more specific advice, but your question is about as vague as they get.

Sorry about that, the plugin was made by one of the coworkers that is coming back from vacation on Monday, just got the job. The error msg was something about styles and scripts, I don't have the error msg in front right now, I was looking for best ways to edit code in the plugin then test it without crashing Wordpress

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
FYI, Alex King died of cancer last night.

HookShot
Dec 26, 2005
Is there a plugin or something that I can use to make a widget not load until x seconds have passed?

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
I'm going to post the actual "job" post in SA-Mart, but before I did that I was wondering if someone in here could take a look at my blog and let me know how long/approximate cost it would be to clean up how my site looks on mobile devices.

It's set up well for computers, but there is a mobile version apparently that just looks like utter garbage.

Here is link - http://genesisstrengthfaction.com/

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

Alfalfa posted:

It's set up well for computers, but there is a mobile version apparently that just looks like utter garbage.
1. who told you that?
2. did they point out any specific parts that look dodgy?

The whole thing is already fully responsive - just rescale the window for an example, or kick chrome into device emulation mode.

Your biggest problems is your menu sucks (design wise, functionally it works) and your header bar overlays itself. You can fix that by just hiding one of the elements and scaling your header image correctly.
Your text and titles could do with being smaller, and you should probably remove float from images at the start of articles where possible, because the text to the right gets pretty funky.

That's all I could see off the top of my head, and if that's it, I'd probably say it's just a few hours work, and most of that would overhead like setting up local dev (though you never know without seeing the code innards).

fuf
Sep 12, 2004

haha
Still trying to find an efficient way to migrate sites.

Duplicator plugin is good but you still have to transfer the archive and set up the destination DB manually.

http://managewp.com/ seemed really promising and has a lot of cool features, but they don't let you migrate a site from one server to another while keeping the same site URL - you have to change the URL for their migration script to work. I went back and forth with their support for ages and they wanted me to follow some elaborate process involving adding and removing the site from their control panel with various temporary URLs. Completely stupid.

My dream migration process would be:
1) install some magical plugin on old site
2) enter SSH details of new server, as well as root MySQL pass and destination directory
3) the plugin transfers all files, creates the new DB, migrates the DB

Does anything like that exist?

FutuerBear
Feb 22, 2006
Slippery Tilde
This isn't quite as general as what you're describing, but some hosts like WP Engine have plugins that are basically that simple: http://wpengine.com/support/wp-engine-automatic-migration/.

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

v1nce posted:

1. who told you that?
2. did they point out any specific parts that look dodgy?

The whole thing is already fully responsive - just rescale the window for an example, or kick chrome into device emulation mode.

Your biggest problems is your menu sucks (design wise, functionally it works) and your header bar overlays itself. You can fix that by just hiding one of the elements and scaling your header image correctly.
Your text and titles could do with being smaller, and you should probably remove float from images at the start of articles where possible, because the text to the right gets pretty funky.

That's all I could see off the top of my head, and if that's it, I'd probably say it's just a few hours work, and most of that would overhead like setting up local dev (though you never know without seeing the code innards).

Appreciate the feedback and ill get an sa-mart thread posted this week.

All the text just looks really big in mobile view and the header/menu combination doesn't work like you said.

Those were the main things I've noticed that really bug me and kill the mobile view.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Can I get a few suggestions for the white screen of death?

code:
error_reporting(E_ALL);
@ini_set('display_errors', true);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
I have this on but I don't see any errors in my logs or on the screen.

All I see in my Apache access log is:

code:
12.34.56.78 - - [15/Oct/2015:08:59:54 -0400] "GET / HTTP/1.1" 200 224 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64)
 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36"
And nothing in my error logs.

My php install seems to be okay, I can run phpMyAdmin just fine, as well a base Wordpress install, and the wp-admin/install.php page on this site gives me the "You appear to have already installed WordPress. To reinstall please clear your old database tables first." message. I also made a little dbtest.php with the same user/pass/dbname as in wp-config and it connects successfully.

I've moved a handful of Wordpress/Joomla sites in the past, I'm working from a zip file that a advertising company sent over that went out of business. I imported the MySQL database fine, moved the files over, re-set the permissions.

php version 5.5.9 (it was running on 5.2.17 on the old server)
Wordpress 4.1.7
Apache 2.4.7
mysqld 5.5.44
ubuntu 14.04 server

It was running on GoDaddy before, I'm not sure if there's anything that needs to be changed between a shared environment and running on a Linux VM. I just can't get this fucker to spit out any useful information.

fuf
Sep 12, 2004

haha

Bob Morales posted:

My php install seems to be okay, I can run phpMyAdmin just fine, as well a base Wordpress install,

So a fresh WP install works fine?

You could split the migration into two steps: import the DB first and see if the content displays with the default theme, then import the site files. That might help you narrow down the issue.

For the DB: has the URL changed? WP stores the absolute URL in "siteurl" and "home" in wp_options that you might need to update. Themes and plugins sometimes store absolute URLs too so you might want to do a search-replace on the whole DB. An SQL search-replace isn't enough because it can't handle serialised arrays, so you need something like wp-cli or https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

For the site files: are you migrating the WP core from the old site or just the wp-content directory? Try just migrating the theme directory first, then plugins one by one, etc.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Try going to $url/index.php. If that works then you have a problem with your .htaccess file.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

fuf posted:

So a fresh WP install works fine?

You could split the migration into two steps: import the DB first and see if the content displays with the default theme, then import the site files. That might help you narrow down the issue.

For the DB: has the URL changed? WP stores the absolute URL in "siteurl" and "home" in wp_options that you might need to update. Themes and plugins sometimes store absolute URLs too so you might want to do a search-replace on the whole DB. An SQL search-replace isn't enough because it can't handle serialised arrays, so you need something like wp-cli or https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

For the site files: are you migrating the WP core from the old site or just the wp-content directory? Try just migrating the theme directory first, then plugins one by one, etc.


Fresh install works fine but if change the wp-config.php to use the imported database, I get the white screen. Should I leave the wp-config.php as is and import the old database into the one I set WP up with when I do the new install?

As far as the URL changing, I did HOSTS file entries on my workstation and the VM to point the IP address of the VPS to xyz.com and https://www.xyz.com should that be enough? The database entries in the options table for siteurl and home both say 'xyz.com'

Blinkz0rz posted:

Try going to $url/index.php. If that works then you have a problem with your .htaccess file.

The archived site uses this for a .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
But right now I'm using the default Wordpress content so there's no .htaccess file and if I go to xyz.com/index.php I get a 301 back to xyz.com

code:
96.36.10.110 - - [15/Oct/2015:11:10:00 -0400] "GET /index.php HTTP/1.1" 301 324 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) "
96.36.10.110 - - [15/Oct/2015:11:10:00 -0400] "GET / HTTP/1.1" 200 321 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64)
There's a note in some export file in the zip where it says the php memory limit is 5000m, wouldn't php give me an error if it ran out of memory?

Edit: just puke me out a drat error message!

Bob Morales fucked around with this message at 16:48 on Oct 15, 2015

fuf
Sep 12, 2004

haha

Bob Morales posted:


Should I leave the wp-config.php as is and import the old database into the one I set WP up with when I do the new install?


Hmmm you could try but I guess whatever problem in the DB which is causing the white screen will just be copied over too?

There must be a PHP error log somewhere. Try adding this to wp-config.php and check if it generates a debug.log file in wp-content/ :
code:
define('WP_DEBUG_LOG', true);
Is PHP definitely logging errors to your apache logs? Maybe check the error_log value in php.ini

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Bob Morales posted:



Fresh install works fine but if change the wp-config.php to use the imported database, I get the white screen. Should I leave the wp-config.php as is and import the old database into the one I set WP up with when I do the new install?

As far as the URL changing, I did HOSTS file entries on my workstation and the VM to point the IP address of the VPS to xyz.com and https://www.xyz.com should that be enough? The database entries in the options table for siteurl and home both say 'xyz.com'


The archived site uses this for a .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
But right now I'm using the default Wordpress content so there's no .htaccess file and if I go to xyz.com/index.php I get a 301 back to xyz.com

code:
96.36.10.110 - - [15/Oct/2015:11:10:00 -0400] "GET /index.php HTTP/1.1" 301 324 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) "
96.36.10.110 - - [15/Oct/2015:11:10:00 -0400] "GET / HTTP/1.1" 200 321 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64)
There's a note in some export file in the zip where it says the php memory limit is 5000m, wouldn't php give me an error if it ran out of memory?

Edit: just puke me out a drat error message!

Your rewrites are hosed. There's no reason whatsoever your site should be giving a permanent redirect. Double check your Apache/Nginx settings.

fuf
Sep 12, 2004

haha

Blinkz0rz posted:

Your rewrites are hosed. There's no reason whatsoever your site should be giving a permanent redirect. Double check your Apache/Nginx settings.

WP does a 301 redirect from /index.php to / by default. It's the "redirect_canonical" function in wp-includes/canonical.php. It's a way of avoiding duplicate content.

Don't think this is what's causing Bob's problem.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

fuf posted:

Hmmm you could try but I guess whatever problem in the DB which is causing the white screen will just be copied over too?

There must be a PHP error log somewhere. Try adding this to wp-config.php and check if it generates a debug.log file in wp-content/ :
code:
define('WP_DEBUG_LOG', true);
I got this working somehow. However, I don't get any errors when I get the blank page.

the PHP errors I've gotten are from when I had a typo in a test script:
code:
[15-Oct-2015 13:09:42 America/New_York] PHP Fatal error:  Call to undefined function mysiql_connect()
 in /var/www/wptest/dbinfo.php on line 2
[15-Oct-2015 13:10:11 America/New_York] PHP Deprecated:  mysql_connect(): The mysql extension is
deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/wptest/dbinfo.php on line 2
This is the only error I've gotten in the wp-content/debug.log

code:
15-Oct-2015 17:28:02 UTC] PHP Notice:  Undefined offset: 1 in /var/www/wptest/wp-includes/l10n.php on line 945
php is logging - I can make a script with a type in it, and run it, and it's being logged. But WP doesn't generate any logs that I can find.

Blinkz0rz posted:

Your rewrites are hosed. There's no reason whatsoever your site should be giving a permanent redirect. Double check your Apache/Nginx settings.

I had the old .htaccess in there still which was causing that (drat hidden files), I just removed it.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!


Update on where I'm currently at:


I deleted what I had done so far and started over. This time I downloaded Wordpress 4.1.7 which is what the site was running on. Base install works. Changed the database info around to the database that I imported. As soon as I do that, the white screen comes back.

However, this time I was able to login through /wp-admin. I had to change the password of the admin user with MySQL and I am able to get into the dashboard. I can see all the old articles (I mean posts, I'm warped from dealing with Joomla!11) and such. There are 2 plugins but they are both inactive.

Now what? Still no loving errors.

Edit: Oh boy I activated a theme (since the one it was showing as active was blank) and it works! Now I think I just need to copy over the theme from the old site.

Theme is busted somehow. Activating it breaks the site instantly. Live preview doesn't work either. I should be good from here.

"PHP Fatal error: Call-time pass-by-reference has been removed in ... on line 30"

So either hack the theme up or install PHP 5.3...

Fixed that one error and the theme mostly works.

Thanks for the help, Goons.

Bob Morales fucked around with this message at 19:35 on Oct 15, 2015

fuf
Sep 12, 2004

haha

Bob Morales posted:


Update on where I'm currently at:


I deleted what I had done so far and started over. This time I downloaded Wordpress 4.1.7 which is what the site was running on. Base install works. Changed the database info around to the database that I imported. As soon as I do that, the white screen comes back.

However, this time I was able to login through /wp-admin. I had to change the password of the admin user with MySQL and I am able to get into the dashboard. I can see all the old articles (I mean posts, I'm warped from dealing with Joomla!11) and such. There are 2 plugins but they are both inactive.

Now what? Still no loving errors.

Edit: Oh boy I activated a theme (since the one it was showing as active was blank) and it works! Now I think I just need to copy over the theme from the old site.

Are you sure it white screens with the default Twenty Fifteen theme?

e: just saw your edit :)

e2:

Bob Morales posted:

I had the old .htaccess in there still which was causing that (drat hidden files), I just removed it.

The .htaccess you posted above is just the default file that WP creates so that permalinks work. You'll want to put it back at some point.

fuf fucked around with this message at 18:47 on Oct 15, 2015

huhu
Feb 24, 2006
What could be causing images to randomly load or appear as broken? My guess is because the NGO I'm working with has opted for cheap GoDaddy hosting?

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
We're using godaddy and we've never experienced anything by that description. There's very few things that are "random", so you've probably got a conflict of two resources going on somewhere.

With "random" things, cache is usually the first port of call. If you're using the wordpress hosting like we are, login to your admin and be sure to hit "Flush Cache" in the admin bar. That'll flush the server-side cache but you might still have client-side cache'd stuff, so open up dev tools (F12) and be sure to force flush your local cache too.

If you're still seeing intermittent images; narrow it down. Look at the net tab and see if the images are coming up 404. If they are, try opening them in a new tab and refreshing a few times. Do they appear then disappear? Something is up with your server-side. Next stop would probably be something cache or redirect related in your .htaccess, but that seems unlikely.

Not seeing 404? Not seeing an image request at all? Might be something upstream of the image like the HTML or CSS. Check your source. Check your theme.

Mr Crucial
Oct 28, 2005
What's new pussycat?
Is it possible to have custom pages generated, from database entries, on the fly based on the URL that someone is trying to visit?

So for example, if I have a database table with office details, I can browse to

domain.com/offices/newyork
or
domain.com/offices/london

and the page will display relevant names, addresses etc for that office?

I've been looking at various simple guides for creating page templates but they all seem to assume that the pages will be created manually from the template. I have hundreds and potentially thousands of entries that I'd like to handle this way so creating them manually would be a real pain in the neck.

fuf
Sep 12, 2004

haha

Mr Crucial posted:

Is it possible to have custom pages generated, from database entries, on the fly based on the URL that someone is trying to visit?

This is already exactly how wordpress works? It's not totally clear what you're asking.

Do you mean you already have a database of office details that you're trying to render somehow? WP probably isn't the best choice for that.

If you just want to add details like "Office Address" and have them show up consistently then you could do this:

* Create a custom post type called "office"
* Add a bunch of custom fields (Office Name, Office Address, etc.) to this post type (probably using the Advanced Custom Fields plugin)
* Create a template file called single-office.php that defines where these custom fields are displayed on the page

fuf fucked around with this message at 17:49 on Oct 26, 2015

Mr Crucial
Oct 28, 2005
What's new pussycat?

fuf posted:

Do you mean you already have a database of office details that you're trying to render somehow? WP probably isn't the best choice for that.

Sorry, could have been clearer. It's a pre-existing database. What I'd like to do is create a new table within the the WP database (or a new database if that's considered 'better'), import my data, then have some sort of post or page template that queries the database based on the URL.

I found this series of guides that does roughly what I'm on about, this technique allows you to treat the URL as a set of parameters, then plug those parameters into a query:

http://www.whatmarkdid.com/php/reading-custom-url-parameters-wordpress/

http://www.whatmarkdid.com/php/displaying-data-custom-table-wordpress/

http://www.whatmarkdid.com/php/displaying-child-records-custom-mysql-table-wordpress/

I'll try that and see if it works.

kedo
Nov 27, 2007

Why would you do that in WordPress? It doesn't sound like you want to use any of the functionality WordPress offers besides templating (sorta). I've got to believe there are better tools for the job.

If I were you I'd be asking for recommendations for a PHP/SQL framework (if those are the languages you actually want to use). Querying a database based on URL is not a difficult task without a CMS.

Cugel the Clever
Apr 5, 2009
I LOVE AMERICA AND CAPITALISM DESPITE BEING POOR AS FUCK. I WILL NEVER RETIRE BUT HERE'S ANOTHER 200$ FOR UKRAINE, SLAVA
Like someone above, I'm using one of those overloaded themes that offer everything and the kitchen sink and it actually does a decent job at that, but it every so often inexplicably fails to load any of the CSS that provides the site's layout. At first I thought it was the client's host crapping out, but then I noticed it on a completely different host. Anyone have any experience with this? Anything I can do to more accurately diagnose the problem?

spiritual bypass
Feb 19, 2008

Grimey Drawer
What's in the error logs? In my experience, Wordpress inconsistently doing a silent failure of any kind tends to mean you're running out of memory.

Cugel the Clever
Apr 5, 2009
I LOVE AMERICA AND CAPITALISM DESPITE BEING POOR AS FUCK. I WILL NEVER RETIRE BUT HERE'S ANOTHER 200$ FOR UKRAINE, SLAVA

rt4 posted:

What's in the error logs? In my experience, Wordpress inconsistently doing a silent failure of any kind tends to mean you're running out of memory.
Apache error logs are 100% empty. The sites still load when it happens, it's just a semi-formatted mess.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Are the CSS links appearing in the HTML and then erroring on load or are they simply absent from the document?

Cugel the Clever
Apr 5, 2009
I LOVE AMERICA AND CAPITALISM DESPITE BEING POOR AS FUCK. I WILL NEVER RETIRE BUT HERE'S ANOTHER 200$ FOR UKRAINE, SLAVA

rt4 posted:

Are the CSS links appearing in the HTML and then erroring on load or are they simply absent from the document?
They're simply absent, If I recall correctly, but not all of the CSS links. I'd have to happen upon the site the next time the problem occurs to say for sure... it's so sporadic and doesn't correlate with any change I make that it is hard to say when that would be.

Adbot
ADBOT LOVES YOU

TheReverend
Jun 21, 2005

I have a site that sucks. It's not wordpress.

I'm makinga new site with wordpress. It doesn't suck as much. It's under <url.com/SomeFolder>.

Is this still the correct way to allow the new site overtake the old site? It was published in 2011 so I'm a bit weary.
http://askwpgirl.com/how-do-i-move-wordpress-from-a-subdirectory-to-the-root-directory/

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply