Can I use numberposts=-1 and offset together when using get_posts()?

I believe the issue is that the underlying MySQL query requires a LIMIT clause to go with the OFFSET clause. (I tried to verify this about MySQL and found this https://stackoverflow.com/questions/255517/mysql-offset-infinite-rows ). Since MySQL can’t accept those parameters (offset without a limit), WordPress seems to drop the offset argument.

It’s still a little hacky, but I think your only other option would be to set an arbitrarily high number for the ‘numberposts’ argument. I think it’s safe to say you wouldn’t want more than, say, 500 posts returned. So you could use:

$posts = get_posts(array(
    'offset'    =>  2,
    'numberposts'   =>  500,
));

numberposts is just a limit, so it shouldn’t cause any problems. You could go higher if necessary (MySQL seems to suggest 18446744073709551615 as a max).

From what I can tell looking at the core code, that seems like the best you can do. Hope it helps!